summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-02-25 16:54:48 -0600
committerDavid Sterba <dsterba@suse.cz>2013-02-27 14:40:02 +0100
commit917609b8d6d99dcad158fd7d7fe3deffeca0d68e (patch)
tree626d97a22ba13410c4634972cc7139ee95abe0dc
parenta9df6a1bdef4a495552a6200efdba065957a7183 (diff)
btrfs-progs: Tidy up resolve_root
Whitespace fixes and fix a variable declaration after code. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
-rw-r--r--btrfs-list.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/btrfs-list.c b/btrfs-list.c
index 8c3f84de..a748d5e7 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -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;
}