]> err.no Git - systemd/commitdiff
util: return errno in close_nointr()
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Jun 2011 08:16:09 +0000 (10:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Jun 2011 17:29:44 +0000 (19:29 +0200)
src/util.c

index 156d32a2e0c7dd664f20b095482655e6192baab4..b291e2f729fb947ceb812564b688c13b9bbfd823 100644 (file)
@@ -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;
         }
 }