From: Amos Jeffries Date: Mon, 18 Apr 2011 11:48:02 +0000 (-0600) Subject: Fix ModPoll signedness checks X-Git-Tag: SQUID_3_1_12_1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f88d3454e8d78affc57f27571edbb0782b850e5;p=thirdparty%2Fsquid.git Fix ModPoll signedness checks This npending test bug was preventing any poll() errors from being noticed and displayed. Possibly leading to some of the weird hanging reports we have been unable to replicate. --- diff --git a/src/comm_poll.cc b/src/comm_poll.cc index 9b00ea3631..637901d563 100644 --- a/src/comm_poll.cc +++ b/src/comm_poll.cc @@ -402,7 +402,7 @@ comm_select(int msec) * Note that this will only ever trigger when there are no log files * and stdout/err/in are all closed too. */ - if (nfds == 0 && !npending) { + if (nfds == 0 && npending == 0) { if (shutting_down) return COMM_SHUTDOWN; else @@ -416,7 +416,7 @@ comm_select(int msec) ++statCounter.select_loops; PROF_stop(comm_poll_normal); - if (num >= 0 || npending >= 0) + if (num >= 0 || npending > 0) break; if (ignoreErrno(errno))