Parenthesize the usage of the macro argument within vec_search() macro definition 17/7217/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 20 Jun 2017 10:26:23 +0000 (12:26 +0200)
committerNeale Ranns <nranns@cisco.com>
Tue, 20 Jun 2017 12:58:29 +0000 (12:58 +0000)
Change-Id: I488d7c2b864c0e3661c8abf0363e4b97984d4974
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/vppinfra/vec.h

index 1994d81..de90abf 100644 (file)
@@ -943,7 +943,7 @@ do {                                                \
   word _v(i) = 0;                                      \
   while (_v(i) < vec_len(v))                           \
   {                                                    \
-    if (v[_v(i)] == E)                                 \
+    if ((v)[_v(i)] == E)                                       \
       break;                                           \
     _v(i)++;                                           \
   }                                                    \