diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-03-30 16:21:32 +0200 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-03-30 16:21:32 +0200 |
commit | ea0a8be2ff5afb8385a69cc0df70984e0fd3a570 (patch) | |
tree | 9b6fb2a8915ac34fe8d6ef94c9a41c211ef5f199 /sysdep/unix | |
parent | 54bb032d21d25a2221877e15325e79add10278ec (diff) |
IO/Poll: fix mistaken variable merge
The events variable is used in the short loop decision. The reasons are
not much clear, keeping this to keep the former behaviour.
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index eb1c1cad..112ebe91 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -2045,7 +2045,7 @@ io_loop(void) { int poll_tout; time_t tout; - int nfds, events; + int nfds, events, pout; sock *s; node *n; int fdmax = 256; @@ -2125,16 +2125,16 @@ io_loop(void) /* And finally enter poll() to find active sockets */ watchdog_stop(); - events = poll(pfd, nfds, poll_tout); + pout = poll(pfd, nfds, poll_tout); watchdog_start(); - if (events < 0) + if (pout < 0) { if (errno == EINTR || errno == EAGAIN) continue; die("poll: %m"); } - if (events) + if (pout) { /* guaranteed to be non-empty */ current_sock = SKIP_BACK(sock, n, HEAD(sock_list)); |