From: Rafael Sadowski Subject: Re: iked/relayd: use imsgbuf_get(3) To: Theo Buehler Cc: tech@openbsd.org Date: Fri, 24 Jul 2026 07:48:51 +0200 On Fri Jul 24, 2026 at 07:02:30AM +0200, Theo Buehler wrote: > Just like in bgpd, the special return value of imsg_get(3) is unused, > so replace with the simpler imsgbuf_get(3). With recent cleanup, there > are no imsg_get(3) left in httpd(8). OK rsadowski > > Index: sbin/iked/control.c > =================================================================== > RCS file: /cvs/src/sbin/iked/control.c,v > diff -u -p -r1.45 control.c > --- sbin/iked/control.c 21 Nov 2024 13:35:20 -0000 1.45 > +++ sbin/iked/control.c 24 Jul 2026 04:18:15 -0000 > @@ -279,7 +279,7 @@ control_dispatch_imsg(int fd, short even > } > > for (;;) { > - if ((n = imsg_get(&c->iev.ibuf, &imsg)) == -1) { > + if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) { > control_close(fd, cs); > return; > } > Index: usr.sbin/ikectl/ikectl.c > =================================================================== > RCS file: /cvs/src/usr.sbin/ikectl/ikectl.c,v > diff -u -p -r1.36 ikectl.c > --- usr.sbin/ikectl/ikectl.c 21 Nov 2024 13:38:14 -0000 1.36 > +++ usr.sbin/ikectl/ikectl.c 24 Jul 2026 04:24:36 -0000 > @@ -350,8 +350,8 @@ main(int argc, char *argv[]) > errx(1, "pipe closed"); > > while (!done) { > - if ((n = imsg_get(ibuf, &imsg)) == -1) > - errx(1, "imsg_get error"); > + if ((n = imsgbuf_get(ibuf, &imsg)) == -1) > + errx(1, "imsgbuf_get error"); > if (n == 0) > break; > switch (res->action) { > Index: usr.sbin/relayd/control.c > =================================================================== > RCS file: /cvs/src/usr.sbin/relayd/control.c,v > diff -u -p -r1.68 control.c > --- usr.sbin/relayd/control.c 14 Jun 2026 08:53:06 -0000 1.68 > +++ usr.sbin/relayd/control.c 24 Jul 2026 04:22:09 -0000 > @@ -256,7 +256,7 @@ control_dispatch_imsg(int fd, short even > } > > for (;;) { > - if ((n = imsg_get(&c->iev.ibuf, &imsg)) == -1) { > + if ((n = imsgbuf_get(&c->iev.ibuf, &imsg)) == -1) { > control_close(fd, cs); > return; > } > Index: usr.sbin/relayctl/relayctl.c > =================================================================== > RCS file: /cvs/src/usr.sbin/relayctl/relayctl.c,v > diff -u -p -r1.64 relayctl.c > --- usr.sbin/relayctl/relayctl.c 19 Jun 2026 12:50:39 -0000 1.64 > +++ usr.sbin/relayctl/relayctl.c 24 Jul 2026 04:23:41 -0000 > @@ -232,8 +232,8 @@ main(int argc, char *argv[]) > errx(1, "pipe closed"); > > while (!done) { > - if ((n = imsg_get(ibuf, &imsg)) == -1) > - errx(1, "imsg_get error"); > + if ((n = imsgbuf_get(ibuf, &imsg)) == -1) > + errx(1, "imsgbuf_get error"); > if (n == 0) > break; > switch (res->action) { >