btrfs-progs/cmds
Qu Wenruo 930c6362d1 btrfs-progs: fix all variable shadowing
There are quite some variable shadowing in btrfs-progs, most of them are
just reusing some common names like tmp.
And those are quite safe and the shadowed one are even different type.

But there are some exceptions:

- @end in traverse_tree_blocks()
  There is already an @end with the same type, but a different meaning
  (the end of the current extent buffer passed in).
  Just rename it to @child_end.

- @start in generate_new_data_csums_range()
  Just rename it to @csum_start.

- @size of fixup_chunk_tree_block()
  This one is particularly bad, we declare a local @size and initialize
  it to -1, then before we really utilize the variable @size, we
  immediately reset it to 0, then pass it to logical_to_physical().
  Then there is a location to check if @size is -1, which will always be
  true.

  According to the code in logical_to_physical(), @size would be clamped
  down by its original value, thus our local @size will always be 0.

  This patch would rename the local @size to @found_size, and only set
  it to -1.
  The call site is only to pass something as logical_to_physical()
  requires a non-NULL pointer.
  We don't really need to bother the returned value.

- duplicated @ref declaration in run_delayed_tree_ref()
- duplicated @super_flags in change_meta_csums()
  Just delete the duplicated one.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-10-10 19:16:29 +02:00
..
balance.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
commands.h btrfs-progs: add new group reflink and command 2022-12-07 01:43:30 +01:00
device.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
filesystem-du.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
filesystem-usage.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
filesystem-usage.h btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
filesystem.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
inspect-dump-super.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
inspect-dump-tree.c btrfs-progs: dump-tree: allow using '-' for tree ids 2023-10-06 17:33:08 +02:00
inspect-tree-stats.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
inspect.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
property.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
props.h btrfs-progs: prop set: add force parameter 2021-10-07 18:40:24 +02:00
qgroup.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
qgroup.h btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
quota.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
receive-dump.c btrfs-progs: receive: add support for fs-verity 2022-10-11 09:08:08 +02:00
receive-dump.h btrfs-progs: cmds: update include lists 2022-10-11 09:07:59 +02:00
receive.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
reflink.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
replace.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
rescue-chunk-recover.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
rescue-super-recover.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
rescue.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
rescue.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
restore.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
scrub.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
send.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
subvolume-list.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
subvolume.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
subvolume.h btrfs-progs: subvol: introduce rowspec definition for json output 2023-08-28 17:24:23 +02:00