From: Lennart Poettering Date: Wed, 15 Jun 2011 08:16:09 +0000 (+0200) Subject: util: return errno in close_nointr() X-Git-Tag: v30~175 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48f82119ce55caa7671598fb1bd90df4eb00d150;p=systemd util: return errno in close_nointr() --- diff --git a/src/util.c b/src/util.c index 156d32a2..b291e2f7 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; } }