[systemd-commits] src/shared
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Jun 5 10:38:19 PDT 2014
src/shared/util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 34b42c9694650d99529f81a0c6416e673c503d18
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jun 5 19:38:00 2014 +0200
util: fix fd_cloexec(), fd_nonblock()
diff --git a/src/shared/util.c b/src/shared/util.c
index 7a4dacd..49185a9 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;
More information about the systemd-commits
mailing list