summaryrefslogtreecommitdiff
path: root/difftool
diff options
context:
space:
mode:
Diffstat (limited to 'difftool')
-rw-r--r--difftool/compare_files.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/difftool/compare_files.c b/difftool/compare_files.c
index a977d95..aa11f43 100644
--- a/difftool/compare_files.c
+++ b/difftool/compare_files.c
@@ -33,17 +33,8 @@ int compare_files(sqfsdiff_t *sd, const sqfs_inode_generic_t *old,
uint64_t offset, diff, oldsz, newsz;
int status = 0, ret;
- if (old->base.type == SQFS_INODE_EXT_FILE) {
- oldsz = old->data.file_ext.file_size;
- } else {
- oldsz = old->data.file.file_size;
- }
-
- if (new->base.type == SQFS_INODE_EXT_FILE) {
- newsz = new->data.file_ext.file_size;
- } else {
- newsz = new->data.file.file_size;
- }
+ sqfs_inode_get_file_size(old, &oldsz);
+ sqfs_inode_get_file_size(new, &newsz);
if (oldsz != newsz)
goto out_different;