summaryrefslogtreecommitdiff
path: root/src/libsystemd-daemon/sd-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-daemon/sd-daemon.c')
-rw-r--r--src/libsystemd-daemon/sd-daemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-daemon/sd-daemon.c b/src/libsystemd-daemon/sd-daemon.c
index 79d8ca3709..b1ff43132a 100644
--- a/src/libsystemd-daemon/sd-daemon.c
+++ b/src/libsystemd-daemon/sd-daemon.c
@@ -84,7 +84,7 @@ _sd_export_ int sd_listen_fds(int unset_environment) {
errno = 0;
l = strtoul(e, &p, 10);
- if (errno != 0) {
+ if (errno > 0) {
r = -errno;
goto finish;
}
@@ -109,7 +109,7 @@ _sd_export_ int sd_listen_fds(int unset_environment) {
errno = 0;
l = strtoul(e, &p, 10);
- if (errno != 0) {
+ if (errno > 0) {
r = -errno;
goto finish;
}