diff options
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 7a4dacd213..49185a99a9 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -1393,7 +1393,7 @@ int fd_nonblock(int fd, bool nonblock) { if (nflags == flags) return 0; - if (fcntl(fd, F_SETFL, flags) < 0) + if (fcntl(fd, F_SETFL, nflags) < 0) return -errno; return 0; @@ -1416,7 +1416,7 @@ int fd_cloexec(int fd, bool cloexec) { if (nflags == flags) return 0; - if (fcntl(fd, F_SETFD, flags) < 0) + if (fcntl(fd, F_SETFD, nflags) < 0) return -errno; return 0; |