]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: fix error handling 18984/head
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Mar 2021 16:55:52 +0000 (17:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 12 Mar 2021 16:56:56 +0000 (17:56 +0100)
Noticed by @keszybz, see #18973

src/libsystemd/sd-event/sd-event.c

index 8ab9d419af5cdab7c084fba029a3d9c3bded949d..a35878cd8f4a8ac8efba5a943e70795093149966 100644 (file)
@@ -3802,7 +3802,7 @@ static int epoll_wait_usec(
                                  NULL);
                 if (r >= 0)
                         return r;
-                if (!ERRNO_IS_NOT_SUPPORTED(r) && !ERRNO_IS_PRIVILEGE(r))
+                if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno))
                         return -errno; /* Only fallback to old epoll_wait() if the syscall is masked or not
                                         * supported. */