mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 13:21:10 +01:00
Problem: irregular loop conditions
Solution: use standard loop constructs and optimize some loops
This commit is contained in:
@@ -232,8 +232,10 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
|
||||
|
||||
if (!options.tcp_accept_filters.empty ()) {
|
||||
bool matched = false;
|
||||
for (options_t::tcp_accept_filters_t::size_type i = 0;
|
||||
i != options.tcp_accept_filters.size (); ++i) {
|
||||
for (options_t::tcp_accept_filters_t::size_type
|
||||
i = 0,
|
||||
size = options.tcp_accept_filters.size ();
|
||||
i != size; ++i) {
|
||||
if (options.tcp_accept_filters[i].match_address (
|
||||
reinterpret_cast<struct sockaddr *> (&ss), ss_len)) {
|
||||
matched = true;
|
||||
|
||||
Reference in New Issue
Block a user