aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/sparse_vec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/sparse_vec.h')
-rw-r--r--src/vppinfra/sparse_vec.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vppinfra/sparse_vec.h b/src/vppinfra/sparse_vec.h
index 4bc2cbdeaea..6cab868a8b2 100644
--- a/src/vppinfra/sparse_vec.h
+++ b/src/vppinfra/sparse_vec.h
@@ -76,11 +76,9 @@ sparse_vec_new (uword elt_bytes, uword sparse_index_bits)
ASSERT (sparse_index_bits <= 16);
- v = _vec_resize ((void *) 0,
- /* length increment */ 8,
- /* data bytes */ 8 * elt_bytes,
- /* header bytes */ sizeof (h[0]),
- /* data align */ 0);
+ v = _vec_realloc (0, /* data bytes */ 8, elt_bytes,
+ /* header bytes */ sizeof (h[0]), /* data align */ 0,
+ /* heap */ 0);
/* Make space for invalid entry (entry 0). */
_vec_len (v) = 1;