summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-08-19 15:45:04 +0200
committerDavid Sterba <dsterba@suse.com>2016-08-19 15:45:04 +0200
commit49184a737b39239c2fc36857075d470a8d4e8d1e (patch)
treec7b5bf47b1505072447c4064197783e2d0e840ec /cmds-subvolume.c
parent1c202eb06dfe90ae3ef1dc748e3fea111b632ecd (diff)
btrfs-progs: switch ternary op to an if in cmd_subvol_show
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index be2d41e..e7ef67d 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -937,11 +937,13 @@ static int cmd_subvol_show(int argc, char **argv)
goto out;
}
if (ret) {
- ret < 0 ?
+ if (ret < 0) {
error("Failed to get subvol info %s: %s\n",
- fullpath, strerror(-ret)):
+ fullpath, strerror(-ret));
+ } else {
error("Failed to get subvol info %s: %d\n",
- fullpath, ret);
+ fullpath, ret);
+ }
return ret;
}