udevd: check correct return value of fcntl() (#4758)
authorDaniel Wagner <wagi@monom.org>
Mon, 28 Nov 2016 17:24:26 +0000 (18:24 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 28 Nov 2016 17:24:26 +0000 (18:24 +0100)
This looks like a copy&paste error from the code block above.

src/udev/udevd.c

index d336ee0..895c6f2 100644 (file)
@@ -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");
         }