summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/vec.h')
-rw-r--r--src/vppinfra/vec.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vppinfra/vec.h b/src/vppinfra/vec.h
index a029630559c..f233ae1c48f 100644
--- a/src/vppinfra/vec.h
+++ b/src/vppinfra/vec.h
@@ -111,10 +111,13 @@ void *vec_resize_allocate_memory (void *v,
@return v_prime pointer to resized vector, may or may not equal v
*/
+#define _vec_resize(V,L,DB,HB,A) \
+ _vec_resize_inline(V,L,DB,HB,clib_max((__alignof__((V)[0])),(A)))
+
always_inline void *
-_vec_resize (void *v,
- word length_increment,
- uword data_bytes, uword header_bytes, uword data_align)
+_vec_resize_inline (void *v,
+ word length_increment,
+ uword data_bytes, uword header_bytes, uword data_align)
{
vec_header_t *vh = _vec_find (v);
uword new_data_bytes, aligned_header_bytes;