mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-12-12 05:33:25 +08:00
btrfs-progs: fix a variable shadowing when enabling experimental features
There is another variable shadowing problem which can only be exposed if experimental features are enabled. Inside the branch of BTRFS_PRINT_TREE_CSUM_HEADERS, we declare another local variable @csum, shadowing the @csum of print_header_info(), which is only declared when experimental features are enabled. Just rename the @csum to @tree_csum to avoid the problem. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c94965198a
commit
93e8b661f6
@ -1311,12 +1311,12 @@ static void print_header_info(struct extent_buffer *eb, unsigned int mode)
|
||||
printf("\n");
|
||||
if (fs_info && (mode & BTRFS_PRINT_TREE_CSUM_HEADERS)) {
|
||||
char *tmp = csum_str;
|
||||
u8 *csum = (u8 *)(eb->data + offsetof(struct btrfs_header, csum));
|
||||
u8 *tree_csum = (u8 *)(eb->data + offsetof(struct btrfs_header, csum));
|
||||
|
||||
strcpy(csum_str, " csum 0x");
|
||||
tmp = csum_str + strlen(csum_str);
|
||||
for (i = 0; i < csum_size; i++) {
|
||||
sprintf(tmp, "%02x", csum[i]);
|
||||
sprintf(tmp, "%02x", tree_csum[i]);
|
||||
tmp++;
|
||||
tmp++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user