From: Lennart Poettering Date: Fri, 12 Mar 2021 16:55:52 +0000 (+0100) Subject: sd-event: fix error handling X-Git-Tag: v248-rc4~17^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18984%2Fhead;p=thirdparty%2Fsystemd.git sd-event: fix error handling Noticed by @keszybz, see #18973 --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 8ab9d419af5..a35878cd8f4 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -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. */