aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/latch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc/latch.c')
-rw-r--r--src/backend/storage/ipc/latch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c
index 47983704d7e..67162fdd4a6 100644
--- a/src/backend/storage/ipc/latch.c
+++ b/src/backend/storage/ipc/latch.c
@@ -169,9 +169,9 @@ InitializeLatchSupport(void)
*/
if (pipe(pipefd) < 0)
elog(FATAL, "pipe() failed: %m");
- if (fcntl(pipefd[0], F_SETFL, O_NONBLOCK) < 0)
+ if (fcntl(pipefd[0], F_SETFL, O_NONBLOCK) == -1)
elog(FATAL, "fcntl() failed on read-end of self-pipe: %m");
- if (fcntl(pipefd[1], F_SETFL, O_NONBLOCK) < 0)
+ if (fcntl(pipefd[1], F_SETFL, O_NONBLOCK) == -1)
elog(FATAL, "fcntl() failed on write-end of self-pipe: %m");
selfpipe_readfd = pipefd[0];