aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/fs.c')
-rw-r--r--src/nvim/os/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index af60e1b7af..2beeae7ec6 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -406,7 +406,7 @@ int os_set_cloexec(const int fd)
return -1;
}
if ((fdflags & FD_CLOEXEC) == 0
- && fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC) < 0) {
+ && fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC) == -1) {
e = errno;
ELOG("Failed to set CLOEXEC on descriptor %d: %s", fd, strerror(e));
errno = e;