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
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment