summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/dvmrpe.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:38:16 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:38:16 +0000
commitd54f1ade2567f1c6dc26b339312d1336d564a152 (patch)
tree74538403c70e3e601a2afbb807050093ec09275e /usr.sbin/dvmrpd/dvmrpe.c
parent33a588df978f85e7cafd5cb8ad0c0488cf1d643e (diff)
Convert simple stuff in usr.sbin over to new imsgbuf_init behaviour
OK tb@
Diffstat (limited to 'usr.sbin/dvmrpd/dvmrpe.c')
-rw-r--r--usr.sbin/dvmrpd/dvmrpe.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/dvmrpd/dvmrpe.c b/usr.sbin/dvmrpd/dvmrpe.c
index 48573ba86a9..5b8862f95b9 100644
--- a/usr.sbin/dvmrpd/dvmrpe.c
+++ b/usr.sbin/dvmrpd/dvmrpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dvmrpe.c,v 1.29 2024/11/21 13:21:34 claudio Exp $ */
+/* $OpenBSD: dvmrpe.c,v 1.30 2024/11/21 13:38:14 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -143,10 +143,12 @@ dvmrpe(struct dvmrpd_conf *xconf, int pipe_parent2dvmrpe[2],
if ((iev_rde = malloc(sizeof(struct imsgev))) == NULL ||
(iev_main = malloc(sizeof(struct imsgev))) == NULL)
fatal(NULL);
- imsgbuf_init(&iev_rde->ibuf, pipe_dvmrpe2rde[0]);
+ if (imsgbuf_init(&iev_rde->ibuf, pipe_dvmrpe2rde[0]) == -1)
+ fatal(NULL);
iev_rde->handler = dvmrpe_dispatch_rde;
- imsgbuf_init(&iev_main->ibuf, pipe_parent2dvmrpe[1]);
+ if (imsgbuf_init(&iev_main->ibuf, pipe_parent2dvmrpe[1]) == -1)
+ fatal(NULL);
iev_main->handler = dvmrpe_dispatch_main;
/* setup event handler */