mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-26 16:12:34 +00:00
930c6362d1
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> |
||
---|---|---|
.. | ||
common.c | ||
common.h | ||
image-create.c | ||
image-restore.c | ||
main.c | ||
Makefile | ||
metadump.h | ||
sanitize.c | ||
sanitize.h |