aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/serialize.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-05-04 20:45:41 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-05-05 01:20:53 +0000
commit2f25ef33c870869e613b81ee7603b9b7337e48fe (patch)
treee0c0cfd6bd76bfc4f321a38e2bdbf8914ee452f3 /src/vppinfra/serialize.c
parent89c27818b3bba409ed8e4ccacc9be37384b46705 (diff)
autodetect alignment during _vec_resize
Change-Id: I2896dbde78b5d58dc706756f4c76632c303557ae Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/serialize.c')
-rw-r--r--src/vppinfra/serialize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vppinfra/serialize.c b/src/vppinfra/serialize.c
index fe2146a1e64..a098aa2d98a 100644
--- a/src/vppinfra/serialize.c
+++ b/src/vppinfra/serialize.c
@@ -313,7 +313,7 @@ unserialize_vector_ha (serialize_main_t * m,
if (l > max_length)
serialize_error (&m->header,
clib_error_create ("bad vector length %d", l));
- p = v = _vec_resize (0, l, (uword) l * elt_bytes, header_bytes,
+ p = v = _vec_resize ((void *) 0, l, (uword) l * elt_bytes, header_bytes,
/* align */ align);
while (l != 0)
@@ -444,7 +444,8 @@ unserialize_pool_helper (serialize_main_t * m,
return 0;
}
- v = _vec_resize (0, l, (uword) l * elt_bytes, sizeof (p[0]), align);
+ v = _vec_resize ((void *) 0, l, (uword) l * elt_bytes, sizeof (p[0]),
+ align);
p = pool_header (v);
vec_unserialize (m, &p->free_indices, unserialize_vec_32);