summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpleasectl
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/dhcpleasectl
parent33a588df978f85e7cafd5cb8ad0c0488cf1d643e (diff)
Convert simple stuff in usr.sbin over to new imsgbuf_init behaviour
OK tb@
Diffstat (limited to 'usr.sbin/dhcpleasectl')
-rw-r--r--usr.sbin/dhcpleasectl/dhcpleasectl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/dhcpleasectl/dhcpleasectl.c b/usr.sbin/dhcpleasectl/dhcpleasectl.c
index 3f679f1a9f4..b31e3b55345 100644
--- a/usr.sbin/dhcpleasectl/dhcpleasectl.c
+++ b/usr.sbin/dhcpleasectl/dhcpleasectl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpleasectl.c,v 1.12 2024/11/21 13:26:25 claudio Exp $ */
+/* $OpenBSD: dhcpleasectl.c,v 1.13 2024/11/21 13:38:14 claudio Exp $ */
/*
* Copyright (c) 2021 Florian Obser <florian@openbsd.org>
@@ -156,7 +156,8 @@ main(int argc, char *argv[])
if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, NULL);
- imsgbuf_init(ibuf, ctl_sock);
+ if (imsgbuf_init(ibuf, ctl_sock) == -1)
+ err(1, NULL);
if (!lFlag) {
imsg_compose(ibuf, IMSG_CTL_SEND_REQUEST, 0, 0, -1,