summaryrefslogtreecommitdiff
path: root/usr.sbin/radiusctl/radiusctl.c
diff options
context:
space:
mode:
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) {