[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    [sr-dev] git:master: core: avoid warning of using bitwise operator with boolean result
From:       Daniel-Constantin Mierla <miconda () gmail ! com>
Date:       2014-01-28 18:00:52
Message-ID: 20140128180053.AD641EF804E () rimmer ! ryngle ! com
[Download RAW message or body]

Module: sip-router
Branch: master
Commit: cfb815e440804c2870126c1c098362d5a117f97c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cfb815e440804c2870126c1c098362d5a117f97c


Author: Daniel-Constantin Mierla <miconda@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date:   Tue Jan 28 18:54:50 2014 +0100

core: avoid warning of using bitwise operator with boolean result

- on a report generated by cppcheck sent by David Binderman

---

 tcp_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tcp_main.c b/tcp_main.c
index 0c5a333..6444074 100644
--- a/tcp_main.c
+++ b/tcp_main.c
@@ -4404,7 +4404,7 @@ static ticks_t tcpconn_main_timeout(ticks_t t, struct timer_ln* \
tl, void* data)  c->wbuf_q.queued);
 	
 	tcp_async=cfg_get(tcp, tcp_cfg, async);
-	if (likely(TICKS_LT(t, c->timeout) && ( !tcp_async | _wbufq_empty(c) |
+	if (likely(TICKS_LT(t, c->timeout) && ( !tcp_async || _wbufq_empty(c) ||
 					TICKS_LT(t, c->wbuf_q.wr_timeout)) )){
 		if (unlikely(tcp_async && _wbufq_non_empty(c)))
 			return (ticks_t)MIN_unsigned(c->timeout-t, c->wbuf_q.wr_timeout-t);


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic