mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 23:22:27 +00:00
btrfs-progs: cleanup duplicate assignment of variable leaf for btrfs-restore
The value of variable leaf in while loop don't have to be set for every round. Just move it outside. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
0c753f13e9
commit
103f68d715
@ -967,8 +967,9 @@ static int do_list_roots(struct btrfs_root *root)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leaf = path->nodes[0];
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
leaf = path->nodes[0];
|
|
||||||
slot = path->slots[0];
|
slot = path->slots[0];
|
||||||
if (slot >= btrfs_header_nritems(leaf)) {
|
if (slot >= btrfs_header_nritems(leaf)) {
|
||||||
ret = btrfs_next_leaf(root, path);
|
ret = btrfs_next_leaf(root, path);
|
||||||
|
Loading…
Reference in New Issue
Block a user