diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:38:16 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:38:16 +0000 |
commit | d54f1ade2567f1c6dc26b339312d1336d564a152 (patch) | |
tree | 74538403c70e3e601a2afbb807050093ec09275e /usr.sbin/ntpd/ntpd.c | |
parent | 33a588df978f85e7cafd5cb8ad0c0488cf1d643e (diff) |
Convert simple stuff in usr.sbin over to new imsgbuf_init behaviour
OK tb@
Diffstat (limited to 'usr.sbin/ntpd/ntpd.c')
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 0a99fee9316..ed10c7f1806 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.141 2024/11/21 13:26:25 claudio Exp $ */ +/* $OpenBSD: ntpd.c,v 1.142 2024/11/21 13:38:14 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -274,7 +274,8 @@ main(int argc, char *argv[]) if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL) fatal(NULL); - imsgbuf_init(ibuf, pipe_chld[0]); + if (imsgbuf_init(ibuf, pipe_chld[0]) == -1) + fatal(NULL); constraint_cnt = 0; @@ -670,7 +671,8 @@ ctl_main(int argc, char *argv[]) if ((ibuf_ctl = malloc(sizeof(struct imsgbuf))) == NULL) err(1, NULL); - imsgbuf_init(ibuf_ctl, fd); + if (imsgbuf_init(ibuf_ctl, fd) == -1) + err(1, NULL); switch (action) { case CTL_SHOW_STATUS: |