summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-15 10:16:09 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-21 19:29:44 +0200
commit48f82119ce55caa7671598fb1bd90df4eb00d150 (patch)
tree6e84c2a7418f40f75661393f7d4278b2b8b2c8c2 /src/util.c
parent3f49d45a45c6c585098590174c3245d2d9bdde0a (diff)
util: return errno in close_nointr()
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 156d32a2e0..b291e2f729 100644
--- a/src/util.c
+++ b/src/util.c
@@ -230,11 +230,12 @@ int close_nointr(int fd) {
for (;;) {
int r;
- if ((r = close(fd)) >= 0)
+ r = close(fd);
+ if (r >= 0)
return r;
if (errno != EINTR)
- return r;
+ return -errno;
}
}