Skip to content

Commit f996c93

Browse files
committed
eloop: Simplify ppoll a little
1 parent 40a1e61 commit f996c93

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/eloop.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,17 +1029,7 @@ eloop_run_ppoll(struct eloop *eloop, const struct timespec *ts)
10291029
continue;
10301030
if (e->pollfd->revents) {
10311031
nn--;
1032-
events = 0;
1033-
if (pfd->revents & POLLIN)
1034-
events |= ELE_READ;
1035-
if (pfd->revents & POLLOUT)
1036-
events |= ELE_WRITE;
1037-
if (pfd->revents & POLLHUP)
1038-
events |= ELE_HANGUP;
1039-
if (pfd->revents & POLLERR)
1040-
events |= ELE_ERROR;
1041-
if (pfd->revents & POLLNVAL)
1042-
events |= ELE_NVAL;
1032+
events = eloop_pollevents(pfd);
10431033
if (events)
10441034
e->cb(e->cb_arg, events);
10451035
}

0 commit comments

Comments
 (0)