summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/ring.h')
-rw-r--r--src/vppinfra/ring.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vppinfra/ring.h b/src/vppinfra/ring.h
index d7e19156482..8527fdb5978 100644
--- a/src/vppinfra/ring.h
+++ b/src/vppinfra/ring.h
@@ -37,12 +37,11 @@ clib_ring_new_inline (void **p, u32 elt_bytes, u32 size, u32 align)
{
void *v;
clib_ring_header_t *h;
+ vec_attr_t va = { .elt_sz = elt_bytes,
+ .hdr_sz = sizeof (clib_ring_header_t),
+ .align = align };
- v = _vec_realloc (0,
- /* length increment */ size,
- /* data bytes */ elt_bytes,
- /* header bytes */ sizeof (h[0]),
- /* data align */ align, 0);
+ v = _vec_alloc_internal (size, &va);
h = clib_ring_header (v);
h->next = 0;