From: Wenjian Ma Date: Fri, 19 Jun 2015 02:53:26 +0000 (+0800) Subject: lib, stream: fix stream sanity checks X-Git-Tag: frr-2.0-rc1~731 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f0b0df1c330a2be955b8d069e4d0435eb2b60d95;p=matthieu%2Ffrr.git lib, stream: fix stream sanity checks Because operator "!" has higher priority than "&&", So we put the "&&" expression in "()" to check both getp and endp. Acked-by: Donald Sharp (cherry picked from commit 1ed8ce47b922b71f3b3cdd661e647bbe7ed2eca7) --- diff --git a/lib/stream.c b/lib/stream.c index b0838e7934..27f13d7698 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) ); \