aboutsummaryrefslogtreecommitdiff
path: root/logger.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-01-21 12:23:16 +0000
committerOmar Polo <op@omarpolo.com>2024-01-21 12:23:16 +0000
commitb03e976aa26d100ec1bf976dfdd005868395b490 (patch)
treea58e7f5dc66dc3f3f4f9a1178e34bc36d795440d /logger.c
parent6bce8180d96c2e1076bd131572979aae54a2fa9f (diff)
convert to use imsg_get_fd()
since proc_forward_imsg() never forwards a file descriptor (it's never called actually) just use -1 there.
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;