diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-12 23:25:23 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-18 20:25:19 +0100 |
commit | 9c4615fb09f559642742d3698ecb5a430c698230 (patch) | |
tree | 2fc38309accc48f0a01c50c12e330ab5baa26f27 /src/basic/btrfs-util.c | |
parent | tree-wide: check if errno is greater than zero (2) (diff) | |
download | systemd-9c4615fb09f559642742d3698ecb5a430c698230.tar.xz systemd-9c4615fb09f559642742d3698ecb5a430c698230.zip |
Use negative_errno() to assert errno is positive after a few system calls
This is not particularly intrusive because it happens in simple
utility functions. It helps gcc understand that error codes
are negative.
This gets a rid of most of the remaining warnings.
Diffstat (limited to 'src/basic/btrfs-util.c')
-rw-r--r-- | src/basic/btrfs-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c index acd48f6954..d07d1df5a8 100644 --- a/src/basic/btrfs-util.c +++ b/src/basic/btrfs-util.c @@ -2051,7 +2051,7 @@ int btrfs_subvol_get_parent(int fd, uint64_t subvol_id, uint64_t *ret) { args.key.nr_items = 256; if (ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args) < 0) - return -errno; + return negative_errno(); if (args.key.nr_items <= 0) break; |