btrfs-progs: print-tree: use proper helper for reading offset

Sparse warns

print-tree.c:1261:49: warning: incorrect type in argument 4 (different base types)
print-tree.c:1261:49:    expected unsigned long long [unsigned] [usertype] start
print-tree.c:1261:49:    got restricted __le64 [addressable] [usertype] offset

which means we have to use the helper instead of directly accessing the offset
member. This could print bogus number on bigendian arch.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-09-23 20:45:24 +02:00
parent 8eccfa86c0
commit 510a282f7f

View File

@ -1258,7 +1258,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *eb)
break;
case BTRFS_EXTENT_CSUM_KEY:
print_extent_csum(eb, root->fs_info, item_size,
disk_key.offset);
offset);
break;
case BTRFS_EXTENT_DATA_KEY:
print_file_extent_item(eb, item, i, ptr);