summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}
}