summaryrefslogtreecommitdiff
path: root/btrfs-list.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-10-31 12:46:52 +0100
committerDavid Sterba <dsterba@suse.com>2016-11-09 13:47:29 +0100
commitfc82ce45dc09b46c32af439c7d0f4ad2ecca0f1a (patch)
tree199c50bff8dc76d1edaf29dd73b3aa62744e8348 /btrfs-list.c
parentf4ea2ec9819f63b19e3cbf13ed77769de1d4718f (diff)
btrfs-progs: subvol list: remove ugly goto construct
Jumping into an if is not considered nice. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-list.c')
-rw-r--r--btrfs-list.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/btrfs-list.c b/btrfs-list.c
index fc4215f0..f793d285 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -277,7 +277,7 @@ static int sort_comp(struct root_info *entry1, struct root_info *entry2,
int i, ret = 0;
if (!set || !set->ncomps)
- goto comp_rootid;
+ return comp_entry_with_rootid(entry1, entry2, 0);
for (i = 0; i < set->ncomps; i++) {
if (!set->comps[i].comp_func)
@@ -292,10 +292,8 @@ static int sort_comp(struct root_info *entry1, struct root_info *entry2,
rootid_compared = 1;
}
- if (!rootid_compared) {
-comp_rootid:
+ if (!rootid_compared)
ret = comp_entry_with_rootid(entry1, entry2, 0);
- }
return ret;
}