-#define create_random_vec_wh(elt_type, len, hdr_bytes, seed) \
-({ \
- elt_type * _v(v) = NULL; \
- uword _v(l) = (len); \
- uword _v(h) = (hdr_bytes); \
- u8 * _v(hdr); \
- \
- if (_v(l) == 0) \
- goto __done__; \
- \
- /* ~0 means select random length between 0 and MAX_VEC_LEN. */ \
- if (_v(l) == ~0) \
- _v(l) = bounded_random_u32 (&(seed), 0, MAX_VEC_LEN); \
- \
- _v(v) = _vec_resize (NULL, _v(l), _v(l) * sizeof (elt_type), _v(h), 0); \
- fill_with_random_data (_v(v), vec_bytes (_v(v)), (seed)); \
- \
- /* Fill header with random data as well. */ \
- if (_v(h) > 0) \
- { \
- _v(hdr) = vec_header (_v(v), _v(h)); \
- fill_with_random_data (_v(hdr), _v(h), (seed)); \
- } \
- \
-__done__: \
- _v(v); \
-})
+#define create_random_vec_wh(elt_type, len, hdr_bytes, seed) \
+ ({ \
+ elt_type *_v (v) = NULL; \
+ uword _v (l) = (len); \
+ uword _v (h) = (hdr_bytes); \
+ u8 *_v (hdr); \
+ \
+ if (_v (l) == 0) \
+ goto __done__; \
+ \
+ /* ~0 means select random length between 0 and MAX_VEC_LEN. */ \
+ if (_v (l) == ~0) \
+ _v (l) = bounded_random_u32 (&(seed), 0, MAX_VEC_LEN); \
+ \
+ _v (v) = \
+ _vec_resize (NULL, _v (l), _v (l) * sizeof (elt_type), _v (h), 0); \
+ fill_with_random_data (_v (v), vec_bytes (_v (v)), (seed)); \
+ \
+ /* Fill header with random data as well. */ \
+ if (_v (h) > 0) \
+ { \
+ _v (hdr) = vec_header (_v (v)); \
+ fill_with_random_data (_v (hdr), _v (h), (seed)); \
+ } \
+ \
+ __done__: \
+ _v (v); \
+ })