diff options
author | David Tardon <dtardon@redhat.com> | 2022-11-30 16:56:40 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2022-12-14 09:57:35 +0100 |
commit | 246caacbb41c311b95d8f86da160260a35dace2f (patch) | |
tree | 9a1f3ade5eb5eb8b5e5712564381ddabd214d28c /src/shared/btrfs-util.c | |
parent | machine: propagate error from machine_new (diff) | |
download | systemd-246caacbb41c311b95d8f86da160260a35dace2f.tar.xz systemd-246caacbb41c311b95d8f86da160260a35dace2f.zip |
btrfs-util: shorten a bit
Diffstat (limited to 'src/shared/btrfs-util.c')
-rw-r--r-- | src/shared/btrfs-util.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/shared/btrfs-util.c b/src/shared/btrfs-util.c index ba02de17f8..b1aaf746cf 100644 --- a/src/shared/btrfs-util.c +++ b/src/shared/btrfs-util.c @@ -511,10 +511,7 @@ int btrfs_subvol_get_info_fd(int fd, uint64_t subvol_id, BtrfsSubvolInfo *ret) { } finish: - if (!found) - return -ENODATA; - - return 0; + return found ? 0 : -ENODATA; } int btrfs_qgroup_get_quota_fd(int fd, uint64_t qgroupid, BtrfsQuotaInfo *ret) { |