X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Ftest_vec.c;h=f32cd7ffb82c7876480bea7fa667ce3a52afc070;hb=43daea8309e9f58468ad562e15b81c5a4d8aa2b2;hp=cd46137589390ee67b125d864ed5eb5052e9c803;hpb=05563c9a904b6bb862ba783dc3519c8415bf9cf5;p=vpp.git diff --git a/src/vppinfra/test_vec.c b/src/vppinfra/test_vec.c index cd461375893..f32cd7ffb82 100644 --- a/src/vppinfra/test_vec.c +++ b/src/vppinfra/test_vec.c @@ -221,8 +221,7 @@ dump_call_stats (uword * stats) 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); \ + _v (v) = _vec_realloc (NULL, _v (l), sizeof (elt_type), _v (h), 0, 0); \ fill_with_random_data (_v (v), vec_bytes (_v (v)), (seed)); \ \ /* Fill header with random data as well. */ \ @@ -677,7 +676,7 @@ validate_vec_init_h (uword num_elts, uword hdr_bytes) uword len; elt_t *new; - new = vec_new_ha (elt_t, num_elts, hdr_bytes, 0); + new = vec_new_generic (elt_t, num_elts, hdr_bytes, 0, 0); len = vec_len (new); ASSERT (len == num_elts);