Commit 60b63ed5 authored by Hunter Laux's avatar Hunter Laux Committed by GitHub

Remove an unnecessary while (true)

This block of code will either return -1 or fall through.
The while (true) does nothing.
The braces limit the scope of int rc.
parent 2ece58ac
...@@ -941,7 +941,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) ...@@ -941,7 +941,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
timeout = end - now; timeout = end - now;
// Wait for events. // Wait for events.
while (true) { {
int rc = poll (pollfds, nitems_, timeout); int rc = poll (pollfds, nitems_, timeout);
if (rc == -1 && errno == EINTR) { if (rc == -1 && errno == EINTR) {
if (pollfds != spollfds) if (pollfds != spollfds)
...@@ -949,7 +949,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) ...@@ -949,7 +949,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
return -1; return -1;
} }
errno_assert (rc >= 0); errno_assert (rc >= 0);
break;
} }
// Check for the events. // Check for the events.
for (int i = 0; i != nitems_; i++) { for (int i = 0; i != nitems_; i++) {
......
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