From: Daniel Wagner Date: Mon, 28 Nov 2016 17:24:26 +0000 (+0100) Subject: udevd: check correct return value of fcntl() (#4758) X-Git-Tag: v233~383 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a92cf7840ffefc279bc5cc409197d13752dec6e7;p=thirdparty%2Fsystemd.git udevd: check correct return value of fcntl() (#4758) This looks like a copy&paste error from the code block above. --- diff --git a/src/udev/udevd.c b/src/udev/udevd.c index d336ee003c2..895c6f271b5 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1345,7 +1345,7 @@ static int listen_fds(int *rctrl, int *rnetlink) { return log_error_errno(netlink_fd, "could not get uevent fd: %m"); netlink_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3); - if (ctrl_fd < 0) + if (netlink_fd < 0) return log_error_errno(errno, "could not dup netlink fd: %m"); }