summaryrefslogtreecommitdiff
path: root/usr.sbin/radiusctl/radiusctl.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:23:38 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:23:38 +0000
commit84671b23213e8c6ba92d0184927901d648dbf307 (patch)
tree8e8be2cb1b536ffea1d765202678f568dc804673 /usr.sbin/radiusctl/radiusctl.c
parenta5e6a7ab6365d006f08c153000459c5e2f17ed9e (diff)
Convert radiusd to new imsgbuf_read behaviour.
OK tb@
Diffstat (limited to 'usr.sbin/radiusctl/radiusctl.c')
-rw-r--r--usr.sbin/radiusctl/radiusctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/radiusctl/radiusctl.c b/usr.sbin/radiusctl/radiusctl.c
index a1a3c5471c3..14eec580921 100644
--- a/usr.sbin/radiusctl/radiusctl.c
+++ b/usr.sbin/radiusctl/radiusctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusctl.c,v 1.15 2024/11/21 13:17:02 claudio Exp $ */
+/* $OpenBSD: radiusctl.c,v 1.16 2024/11/21 13:23:37 claudio Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
*
@@ -188,8 +188,7 @@ main(int argc, char *argv[])
if (imsgbuf_flush(&ibuf) == -1)
err(1, "ibuf_ctl: imsgbuf_flush error");
while (!done) {
- if (((n = imsgbuf_read(&ibuf)) == -1 && errno != EAGAIN) ||
- n == 0)
+ if (imsgbuf_read(&ibuf) != 1)
break;
for (;;) {
if ((n = imsg_get(&ibuf, &imsg)) <= 0) {