btrfs-progs: Tidy up resolve_root
authorEric Sandeen <sandeen@redhat.com>
Mon, 25 Feb 2013 22:54:48 +0000 (16:54 -0600)
committerDavid Sterba <dsterba@suse.cz>
Wed, 27 Feb 2013 13:40:02 +0000 (14:40 +0100)
Whitespace fixes and fix a variable declaration after
code.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
btrfs-list.c

index 8c3f84deab1ffda646bed650d6509d8bd903352a..a748d5e79f6f2a845e9623b0c551756844b3dc03 100644 (file)
@@ -564,15 +564,18 @@ static int resolve_root(struct root_lookup *rl, struct root_info *ri,
        while (1) {
                char *tmp;
                u64 next;
+               int add_len;
+
                /*
-               * ref_tree = 0 indicates the subvolumes
-               * has been deleted.
-               */
+                * ref_tree = 0 indicates the subvolumes
+                * has been deleted.
+                */
                if (!found->ref_tree) {
                        free(full_path);
                        return -ENOENT;
                }
-               int add_len = strlen(found->path);
+
+               add_len = strlen(found->path);
 
                /* room for / and for null */
                tmp = malloc(add_len + 2 + len);
@@ -595,7 +598,7 @@ static int resolve_root(struct root_lookup *rl, struct root_info *ri,
 
                next = found->ref_tree;
 
-               if (next ==  top_id) {
+               if (next == top_id) {
                        ri->top_id = top_id;
                        break;
                }