aboutsummaryrefslogtreecommitdiff
path: root/logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'logger.c')
-rw-r--r--logger.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/logger.c b/logger.c
index 36ccaa3..799b94e 100644
--- a/logger.c
+++ b/logger.c
@@ -93,10 +93,7 @@ logger_dispatch_parent(int fd, struct privsep_proc *p, struct imsg *imsg)
case IMSG_LOG_ACCESS:
if (logfd != -1)
close(logfd);
- logfd = -1;
-
- if (imsg->fd != -1)
- logfd = imsg->fd;
+ logfd = imsg_get_fd(imsg);
break;
default:
return -1;