vppinfra: type prove vec_new and vec_resize 15/26315/4
authorAndreas Schultz <andreas.schultz@travelping.com>
Thu, 26 Mar 2020 14:18:52 +0000 (14:18 +0000)
committerDamjan Marion <dmarion@me.com>
Tue, 28 Apr 2020 21:16:58 +0000 (21:16 +0000)
commitc458c493667bde30c22760e3a1839f2cac6e6447
treed5e9d4ae3cdcb01266887c9d1ba9c0e83bec8103
parent24e2c50bf34af37b688df83cd8d39a58345349c5
vppinfra: type prove vec_new and vec_resize

Some vector functions (e.g. vec_new) pass the vector pointer through
vec_resize. This turn the pointer from a real type into a void pointer.
Explicitly cast the pointer back to its original type to catch type
mismatches.

Type: improvement

Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: Id13e52d4f038af2cee28e5abf1aca720f8909378
src/vppinfra/vec.h