Browse code

core: avoid warning of using bitwise operator with boolean result

- on a report generated by cppcheck sent by David Binderman

Daniel-Constantin Mierla authored on 28/01/2014 17:54:50
Showing 1 changed files
... ...
@@ -4404,7 +4404,7 @@ static ticks_t tcpconn_main_timeout(ticks_t t, struct timer_ln* tl, void* data)
4404 4404
 			c->wbuf_q.queued);
4405 4405
 	
4406 4406
 	tcp_async=cfg_get(tcp, tcp_cfg, async);
4407
-	if (likely(TICKS_LT(t, c->timeout) && ( !tcp_async | _wbufq_empty(c) |
4407
+	if (likely(TICKS_LT(t, c->timeout) && ( !tcp_async || _wbufq_empty(c) ||
4408 4408
 					TICKS_LT(t, c->wbuf_q.wr_timeout)) )){
4409 4409
 		if (unlikely(tcp_async && _wbufq_non_empty(c)))
4410 4410
 			return (ticks_t)MIN_unsigned(c->timeout-t, c->wbuf_q.wr_timeout-t);