diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-11 18:57:42 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-11 19:13:18 -0400 |
commit | bcb161b0230fdd1faf9176f95fee76a7db6afd59 (patch) | |
tree | c3ba8c1cf806c961842bd51b42c6e8f9b7b59c6e /src/libsystemd-bus | |
parent | 0ad4e1a872e789c77828d4c4825a56241103650c (diff) |
errno is positive
Make sure we compare errno against positive error codes.
The ones in hwclock.c and install.c can have an impact, the
rest are unlikely to be hit or in code that isn't widely
used.
Also check that errno > 0, to help gcc know that we are
returning a negative error code.
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/bus-kernel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c index e5e3536ad0..b83dfcbc27 100644 --- a/src/libsystemd-bus/bus-kernel.c +++ b/src/libsystemd-bus/bus-kernel.c @@ -339,7 +339,7 @@ int bus_kernel_read_message(sd_bus *bus, sd_bus_message **m) { if (errno == EAGAIN) return 0; - if (errno != -EMSGSIZE) + if (errno != EMSGSIZE) return -errno; sz *= 2; |