summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 46c20bec9c..b69e7e882a 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -207,14 +207,12 @@ int close_nointr(int fd) {
}
void close_nointr_nofail(int fd) {
- int saved_errno = errno;
+ PROTECT_ERRNO;
/* like close_nointr() but cannot fail, and guarantees errno
* is unchanged */
assert_se(close_nointr(fd) == 0);
-
- errno = saved_errno;
}
void close_many(const int fds[], unsigned n_fd) {