u_dynarray: add util_dynarray_grow_cap
authorQiang Yu <yuq825@gmail.com>
Mon, 19 Feb 2018 13:44:44 +0000 (21:44 +0800)
committerQiang Yu <yuq825@gmail.com>
Thu, 11 Apr 2019 01:57:53 +0000 (09:57 +0800)
commitdc37942c4e1dff8b9bba96b482a6b4fae766df6f
treef7d6280f01b6b42f78372a17f1b23ec883cbe45a
parent509dd6e20b1bfa8f42966da1ea421a0b7057485c
u_dynarray: add util_dynarray_grow_cap

This is for the case that user only know a max size
it wants to append to the array and enlarge the array
capacity before writing into it.

v2:
- rename newsize to newcap
- rename util_dynarray_enlarge to util_dynarray_grow_cap

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/util/u_dynarray.h