Commit fa804c77 authored by Simon Giesecke's avatar Simon Giesecke

Problem: pseudo-loops which had exactly one iteration

Solution: removed them
parent 579aa5b4
...@@ -596,14 +596,11 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_, ...@@ -596,14 +596,11 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
static_cast<int> (std::min<uint64_t> (end - now, INT_MAX)); static_cast<int> (std::min<uint64_t> (end - now, INT_MAX));
// Wait for events. // Wait for events.
while (true) {
int rc = poll (_pollfds, _pollset_size, timeout); int rc = poll (_pollfds, _pollset_size, timeout);
if (rc == -1 && errno == EINTR) { if (rc == -1 && errno == EINTR) {
return -1; return -1;
} }
errno_assert (rc >= 0); errno_assert (rc >= 0);
break;
}
// Receive the signal from pollfd // Receive the signal from pollfd
if (_use_signaler && _pollfds[0].revents & POLLIN) if (_use_signaler && _pollfds[0].revents & POLLIN)
...@@ -653,7 +650,6 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_, ...@@ -653,7 +650,6 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
} }
// Wait for events. Ignore interrupts if there's infinite timeout. // Wait for events. Ignore interrupts if there's infinite timeout.
while (true) {
memcpy (inset.get (), _pollset_in.get (), memcpy (inset.get (), _pollset_in.get (),
valid_pollset_bytes (*_pollset_in.get ())); valid_pollset_bytes (*_pollset_in.get ()));
memcpy (outset.get (), _pollset_out.get (), memcpy (outset.get (), _pollset_out.get (),
...@@ -674,8 +670,6 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_, ...@@ -674,8 +670,6 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
return -1; return -1;
} }
#endif #endif
break;
}
if (_use_signaler && FD_ISSET (_signaler->get_fd (), inset.get ())) if (_use_signaler && FD_ISSET (_signaler->get_fd (), inset.get ()))
_signaler->recv (); _signaler->recv ();
......
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