From: Roy Marples Date: Fri, 14 Nov 2025 15:05:39 +0000 (+0000) Subject: eloop: Simplify ppoll a little X-Git-Tag: v10.3.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8880b8afca88fface1cde04b3963c72e60320fb0;p=thirdparty%2Fdhcpcd.git eloop: Simplify ppoll a little --- diff --git a/src/eloop.c b/src/eloop.c index ed0fa9e7..6c162613 100644 --- a/src/eloop.c +++ b/src/eloop.c @@ -1029,17 +1029,7 @@ eloop_run_ppoll(struct eloop *eloop, const struct timespec *ts) continue; if (e->pollfd->revents) { nn--; - events = 0; - if (pfd->revents & POLLIN) - events |= ELE_READ; - if (pfd->revents & POLLOUT) - events |= ELE_WRITE; - if (pfd->revents & POLLHUP) - events |= ELE_HANGUP; - if (pfd->revents & POLLERR) - events |= ELE_ERROR; - if (pfd->revents & POLLNVAL) - events |= ELE_NVAL; + events = eloop_pollevents(pfd); if (events) e->cb(e->cb_arg, events); }