From a1c98f7fa9aa0cd5075ef2054c5d2be4d1e740f0 Mon Sep 17 00:00:00 2001 From: Joel Bosveld Date: Fri, 24 Apr 2009 10:12:26 -0700 Subject: Correct fcntl(F_SETOWN) error check in non-Solaris sigio code commit 64b7f96dca accidentally inverted the comparison, could result in crashes on some systems later on. Signed-off-by: Alan Coopersmith --- hw/xfree86/os-support/shared/sigio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c index 256578289..5ba0b7e1c 100644 --- a/hw/xfree86/os-support/shared/sigio.c +++ b/hw/xfree86/os-support/shared/sigio.c @@ -157,7 +157,7 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n", fd, strerror(errno)); } else { - if (fcntl(fd, F_SETOWN, getpid()) != -1) { + if (fcntl(fd, F_SETOWN, getpid()) == -1) { xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n", fd, strerror(errno)); } else { -- cgit v1.2.3