From fc82ce45dc09b46c32af439c7d0f4ad2ecca0f1a Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 31 Oct 2016 12:46:52 +0100 Subject: [PATCH] btrfs-progs: subvol list: remove ugly goto construct Jumping into an if is not considered nice. Signed-off-by: David Sterba --- btrfs-list.c | 6 ++---- 1 file 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; }