Whamcloud - gitweb
Fix compile error and warnings for old gcc versions
[tools/e2fsprogs.git] / debugfs / htree.c
index ede1224..cf7d78a 100644 (file)
@@ -287,7 +287,8 @@ void do_htree_dump(int argc, char *argv[])
        fprintf(pager, "\t Indirect levels: %d\n", rootnode->indirect_levels);
        fprintf(pager, "\t Flags: %d\n", rootnode->unused_flags);
 
-       ent = (struct ext2_dx_entry *) (buf + 24 + rootnode->info_length);
+       ent = (struct ext2_dx_entry *)
+               ((char *)rootnode + rootnode->info_length);
 
        htree_dump_int_node(current_fs, ino, &inode, rootnode, ent,
                            buf + current_fs->blocksize,