Our poll implementation does not iterate over the pollfd array properly
while setting the revents.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 9ac2085dbf1821b7995fe360038c1bf0f3940032)
| ... | ... |
@@ -292,7 +292,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout) |
| 292 | 292 |
if (rc < 0) |
| 293 | 293 |
return rc; |
| 294 | 294 |
|
| 295 |
- for(i = 0; i < (nfds_t) n; i++) {
|
|
| 295 |
+ for(i = 0; i < numfds; i++) {
|
|
| 296 | 296 |
fds[i].revents = 0; |
| 297 | 297 |
|
| 298 | 298 |
if (FD_ISSET(fds[i].fd, &read_set)) fds[i].revents |= POLLIN; |