aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/daemon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/daemon.c b/src/daemon.c
index 830beca..977e845 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -218,8 +218,7 @@ reopen(int fd, int oflag)
return -1;
if (dup2(r, fd) == -1)
return saved_errno = errno, close(r), errno = saved_errno, -1;
- close(fd);
- return 0;
+ return close(r), 0;
}