diff options
author | Gui Hecheng <guihc.fnst@cn.fujitsu.com> | 2014-08-21 10:56:52 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-12-04 18:51:51 +0100 |
commit | 103f68d7158fdab45cb3bd3c5b03e1ad75e332ae (patch) | |
tree | b8cfcba03147be258f5c4724ec4fc62e52ae1039 | |
parent | 0c753f13e95a22cacaf1471eca5236ca02ddb3a4 (diff) |
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>
-rw-r--r-- | cmds-restore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c index 2f9b72d3..859deaf3 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -967,8 +967,9 @@ static int do_list_roots(struct btrfs_root *root) return -1; } + leaf = path->nodes[0]; + while (1) { - leaf = path->nodes[0]; slot = path->slots[0]; if (slot >= btrfs_header_nritems(leaf)) { ret = btrfs_next_leaf(root, path); |