[quagga-dev 12770] [PATCH] lib, stream: fix stream sanity checks

Wenjian Ma ytmwjian at 163.com
Fri Jun 19 03:53:26 BST 2015


Because  operator "!" has higher priority  than "&&",
So we put the "&&" expression in "()" to check both getp and endp.
---
 lib/stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/stream.c b/lib/stream.c
index e13da08..9c26fea 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -60,7 +60,7 @@
 
 #define STREAM_VERIFY_SANE(S) \
   do { \
-    if ( !(GETP_VALID(S, (S)->getp)) && ENDP_VALID(S, (S)->endp) ) \
+    if ( !(GETP_VALID(S, (S)->getp) && ENDP_VALID(S, (S)->endp)) ) \
       STREAM_WARN_OFFSETS(S); \
     assert ( GETP_VALID(S, (S)->getp) ); \
     assert ( ENDP_VALID(S, (S)->endp) ); \
-- 
1.9.1






More information about the Quagga-dev mailing list