diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vppinfra/clib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h index 8d1e412db62..7a8029a30bd 100644 --- a/src/vppinfra/clib.h +++ b/src/vppinfra/clib.h @@ -74,6 +74,8 @@ #define BITS(x) (8*sizeof(x)) #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0])) +#define FOREACH_ARRAY_ELT(a, b) \ + for (typeof ((b)[0]) *(a) = (b); (a) - (b) < ARRAY_LEN (b); (a)++) #define _STRUCT_FIELD(t,f) (((t *) 0)->f) #define STRUCT_OFFSET_OF(t,f) offsetof(t, f) |