summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-05 19:38:00 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-05 19:38:00 +0200
commit34b42c9694650d99529f81a0c6416e673c503d18 (patch)
tree37608ca610dd850fa43ec0aa1e377e68077c70c8
parent6cfe2fde1cc919c2333a5749ea1cbc31fa757077 (diff)
util: fix fd_cloexec(), fd_nonblock()
-rw-r--r--src/shared/util.c4
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;