Skip to content
Snippets Groups Projects
Commit 9ac2085d authored by Max Shakhmetov's avatar Max Shakhmetov Committed by Luca Barbato
Browse files

os_support: fix poll() implementation


Our poll implementation does not iterate over the pollfd array properly
while setting the revents.

Signed-off-by: default avatarLuca Barbato <lu_zero@gentoo.org>
parent 737eb597
No related branches found
No related tags found
No related merge requests found
......@@ -292,7 +292,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout)
if (rc < 0)
return rc;
for(i = 0; i < (nfds_t) n; i++) {
for(i = 0; i < numfds; i++) {
fds[i].revents = 0;
if (FD_ISSET(fds[i].fd, &read_set)) fds[i].revents |= POLLIN;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment