diff options
author | David Sterba <dsterba@suse.com> | 2017-01-20 17:41:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-01-25 09:47:56 +0100 |
commit | 4415ff6bcc3fbbe6f9c043fadc19989d772da835 (patch) | |
tree | 015dc43efe2af6319d27378b644b64ac4c1f97b8 /cmds-qgroup.c | |
parent | e135ee70b8cfaff4496effe9a58ecf5f5de33292 (diff) |
btrfs-progs: qgroups show: clean up errno passing
We should use return value for errors, not errno.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-qgroup.c')
-rw-r--r-- | cmds-qgroup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c index bc150772..59a5926b 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -296,7 +296,6 @@ static int cmd_qgroup_show(int argc, char **argv) char *path; int ret = 0; int fd; - int e; DIR *dirstream = NULL; u64 qgroupid; int filter_flag = 0; @@ -383,10 +382,9 @@ static int cmd_qgroup_show(int argc, char **argv) qgroupid); } ret = btrfs_show_qgroups(fd, filter_set, comparer_set); - e = errno; close_file_or_dir(fd, dirstream); if (ret < 0) - error("can't list qgroups: %s", strerror(e)); + error("can't list qgroups: %s", strerror(-ret)); out: return !!ret; |