diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhcp6leased/control.c | 5 | ||||
-rw-r--r-- | sbin/dhcp6leased/dhcp6leased.c | 4 | ||||
-rw-r--r-- | sbin/dhcp6leased/engine.c | 6 | ||||
-rw-r--r-- | sbin/dhcp6leased/frontend.c | 6 | ||||
-rw-r--r-- | sbin/dhcpleased/control.c | 5 | ||||
-rw-r--r-- | sbin/dhcpleased/dhcpleased.c | 6 | ||||
-rw-r--r-- | sbin/dhcpleased/engine.c | 6 | ||||
-rw-r--r-- | sbin/dhcpleased/frontend.c | 6 | ||||
-rw-r--r-- | sbin/iked/control.c | 5 | ||||
-rw-r--r-- | sbin/iked/proc.c | 4 | ||||
-rw-r--r-- | sbin/slaacd/control.c | 5 | ||||
-rw-r--r-- | sbin/slaacd/engine.c | 6 | ||||
-rw-r--r-- | sbin/slaacd/frontend.c | 6 | ||||
-rw-r--r-- | sbin/slaacd/slaacd.c | 6 | ||||
-rw-r--r-- | sbin/unwind/control.c | 5 | ||||
-rw-r--r-- | sbin/unwind/frontend.c | 6 | ||||
-rw-r--r-- | sbin/unwind/resolver.c | 6 | ||||
-rw-r--r-- | sbin/unwind/unwind.c | 6 |
18 files changed, 47 insertions, 52 deletions
diff --git a/sbin/dhcp6leased/control.c b/sbin/dhcp6leased/control.c index 14c46002cd0..df3da1035c3 100644 --- a/sbin/dhcp6leased/control.c +++ b/sbin/dhcp6leased/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.7 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.8 2024/11/21 13:21:33 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -231,8 +231,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } if (event & EV_READ) { - if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 && - errno != EAGAIN) || n == 0) { + if (imsgbuf_read(&c->iev.ibuf) != 1) { control_close(fd); return; } diff --git a/sbin/dhcp6leased/dhcp6leased.c b/sbin/dhcp6leased/dhcp6leased.c index 7930d0cf290..50ce64edf23 100644 --- a/sbin/dhcp6leased/dhcp6leased.c +++ b/sbin/dhcp6leased/dhcp6leased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp6leased.c,v 1.17 2024/11/21 13:18:37 claudio Exp $ */ +/* $OpenBSD: dhcp6leased.c,v 1.18 2024/11/21 13:21:33 claudio Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org> @@ -426,7 +426,7 @@ main_dispatch_frontend(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/dhcp6leased/engine.c b/sbin/dhcp6leased/engine.c index df3454dba0e..0f1ab78f58e 100644 --- a/sbin/dhcp6leased/engine.c +++ b/sbin/dhcp6leased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.28 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: engine.c,v 1.29 2024/11/21 13:21:33 claudio Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org> @@ -276,7 +276,7 @@ engine_dispatch_frontend(int fd, short event, void *bula) uint32_t if_index; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -385,7 +385,7 @@ engine_dispatch_main(int fd, short event, void *bula) int shut = 0; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/dhcp6leased/frontend.c b/sbin/dhcp6leased/frontend.c index 79ea9d4095a..24b3e2afe1d 100644 --- a/sbin/dhcp6leased/frontend.c +++ b/sbin/dhcp6leased/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.18 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: frontend.c,v 1.19 2024/11/21 13:21:33 claudio Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org> @@ -243,7 +243,7 @@ frontend_dispatch_main(int fd, short event, void *bula) int shut = 0, udpsock, if_index; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -449,7 +449,7 @@ frontend_dispatch_engine(int fd, short event, void *bula) int shut = 0; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/dhcpleased/control.c b/sbin/dhcpleased/control.c index 57d3750ae93..b342c62d09a 100644 --- a/sbin/dhcpleased/control.c +++ b/sbin/dhcpleased/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.10 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.11 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -233,8 +233,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } if (event & EV_READ) { - if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 && - errno != EAGAIN) || n == 0) { + if (imsgbuf_read(&c->iev.ibuf) != 1) { control_close(fd); return; } diff --git a/sbin/dhcpleased/dhcpleased.c b/sbin/dhcpleased/dhcpleased.c index e3438df2f10..907dbccf5bc 100644 --- a/sbin/dhcpleased/dhcpleased.c +++ b/sbin/dhcpleased/dhcpleased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpleased.c,v 1.37 2024/11/21 13:18:37 claudio Exp $ */ +/* $OpenBSD: dhcpleased.c,v 1.38 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -444,7 +444,7 @@ main_dispatch_frontend(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -526,7 +526,7 @@ main_dispatch_engine(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/dhcpleased/engine.c b/sbin/dhcpleased/engine.c index e3a684a076d..8cd975af9d0 100644 --- a/sbin/dhcpleased/engine.c +++ b/sbin/dhcpleased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.53 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: engine.c,v 1.54 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -289,7 +289,7 @@ engine_dispatch_frontend(int fd, short event, void *bula) uint32_t if_index, type; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -406,7 +406,7 @@ engine_dispatch_main(int fd, short event, void *bula) int shut = 0; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c index c5e22590dd7..9fb18677d75 100644 --- a/sbin/dhcpleased/frontend.c +++ b/sbin/dhcpleased/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.43 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: frontend.c,v 1.44 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org> @@ -242,7 +242,7 @@ frontend_dispatch_main(int fd, short event, void *bula) int shut = 0, bpfsock, if_index, udpsock; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -485,7 +485,7 @@ frontend_dispatch_engine(int fd, short event, void *bula) int shut = 0; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/iked/control.c b/sbin/iked/control.c index 84142055a9d..71c46b20954 100644 --- a/sbin/iked/control.c +++ b/sbin/iked/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.43 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.44 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -261,8 +261,7 @@ control_dispatch_imsg(int fd, short event, void *arg) } if (event & EV_READ) { - if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 && - errno != EAGAIN) || n == 0) { + if (imsgbuf_read(&c->iev.ibuf) != 1) { control_close(fd, cs); return; } diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c index aa3a81afe55..6b914dff0a5 100644 --- a/sbin/iked/proc.c +++ b/sbin/iked/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.49 2024/11/21 13:18:37 claudio Exp $ */ +/* $OpenBSD: proc.c,v 1.50 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -617,7 +617,7 @@ proc_dispatch(int fd, short event, void *arg) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("%s: imsgbuf_read", __func__); if (n == 0) { /* this pipe is dead, so remove the event handler */ diff --git a/sbin/slaacd/control.c b/sbin/slaacd/control.c index 113af0a8e68..948f3083327 100644 --- a/sbin/slaacd/control.c +++ b/sbin/slaacd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.15 2024/11/21 13:17:56 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.16 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -234,8 +234,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } if (event & EV_READ) { - if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 && - errno != EAGAIN) || n == 0) { + if (imsgbuf_read(&c->iev.ibuf) != 1) { control_close(fd); return; } diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c index 52e92f7279a..f825bfb41ee 100644 --- a/sbin/slaacd/engine.c +++ b/sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.97 2024/11/21 13:17:57 claudio Exp $ */ +/* $OpenBSD: engine.c,v 1.98 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -465,7 +465,7 @@ engine_dispatch_frontend(int fd, short event, void *bula) uint32_t if_index, type; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -633,7 +633,7 @@ engine_dispatch_main(int fd, short event, void *bula) int shut = 0; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c index 2b0bcc18d6e..d0e9fa5d618 100644 --- a/sbin/slaacd/frontend.c +++ b/sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.72 2024/11/21 13:17:57 claudio Exp $ */ +/* $OpenBSD: frontend.c,v 1.73 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -286,7 +286,7 @@ frontend_dispatch_main(int fd, short event, void *bula) int shut = 0, icmp6sock, rdomain; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -398,7 +398,7 @@ frontend_dispatch_engine(int fd, short event, void *bula) uint32_t if_index, type; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c index 6e1577331da..1c231af0848 100644 --- a/sbin/slaacd/slaacd.c +++ b/sbin/slaacd/slaacd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacd.c,v 1.77 2024/11/21 13:18:38 claudio Exp $ */ +/* $OpenBSD: slaacd.c,v 1.78 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2017 Florian Obser <florian@openbsd.org> @@ -391,7 +391,7 @@ main_dispatch_frontend(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -472,7 +472,7 @@ main_dispatch_engine(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/unwind/control.c b/sbin/unwind/control.c index 0b84aa5a99c..0b79362e9ac 100644 --- a/sbin/unwind/control.c +++ b/sbin/unwind/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.21 2024/11/21 13:17:57 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.22 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -233,8 +233,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } if (event & EV_READ) { - if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 && - errno != EAGAIN) || n == 0) { + if (imsgbuf_read(&c->iev.ibuf) != 1) { control_close(fd); return; } diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c index 452c8762787..1312540af37 100644 --- a/sbin/unwind/frontend.c +++ b/sbin/unwind/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.87 2024/11/21 13:17:57 claudio Exp $ */ +/* $OpenBSD: frontend.c,v 1.88 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -311,7 +311,7 @@ frontend_dispatch_main(int fd, short event, void *bula) int n, shut = 0; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -492,7 +492,7 @@ frontend_dispatch_resolver(int fd, short event, void *bula) int n, shut = 0, chg; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index c807921551e..8010761f82a 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.171 2024/11/21 13:17:57 claudio Exp $ */ +/* $OpenBSD: resolver.c,v 1.172 2024/11/21 13:21:34 claudio Exp $ */ /* @@ -495,7 +495,7 @@ resolver_dispatch_frontend(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -633,7 +633,7 @@ resolver_dispatch_main(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c index ad871fc48da..830b410ac58 100644 --- a/sbin/unwind/unwind.c +++ b/sbin/unwind/unwind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwind.c,v 1.73 2024/11/21 13:18:38 claudio Exp $ */ +/* $OpenBSD: unwind.c,v 1.74 2024/11/21 13:21:34 claudio Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -398,7 +398,7 @@ main_dispatch_frontend(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; @@ -463,7 +463,7 @@ main_dispatch_resolver(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + if ((n = imsgbuf_read(ibuf)) == -1) fatal("imsgbuf_read error"); if (n == 0) /* Connection closed. */ shut = 1; |