+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * lib/pipe2.c (pipe2): Fix test of fcntl's return value.
+
2009-08-23 Bruno Haible <bruno@clisp.org>
* modules/fchdir (Depends-on): Use fcntl-h instead of fcntl.
int fcntl_flags;
if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0
- || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) < 0
+ || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1
|| (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0
- || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) < 0)
+ || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1)
goto fail;
}
int fcntl_flags;
if ((fcntl_flags = fcntl (fd[1], F_GETFD, 0)) < 0
- || fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) < 0
+ || fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1
|| (fcntl_flags = fcntl (fd[0], F_GETFD, 0)) < 0
- || fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) < 0)
+ || fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1)
goto fail;
}