diff options
author | Dave Barach <dave@barachs.net> | 2018-10-17 10:38:51 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-23 13:06:46 +0000 |
commit | b7b929931a07fbb27b43d5cd105f366c3e29807e (patch) | |
tree | 438681c89738802dbb5d339715b96ea2c31bafb4 /src/vppinfra/vec.h | |
parent | b9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff) |
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/vec.h')
-rw-r--r-- | src/vppinfra/vec.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vppinfra/vec.h b/src/vppinfra/vec.h index 1b0378fe063..dc7b908a3b5 100644 --- a/src/vppinfra/vec.h +++ b/src/vppinfra/vec.h @@ -423,7 +423,7 @@ do { \ vec_resize_ha ((V), 1 + (_v(i) - _v(l)), (H), (A)); \ /* Must zero new space since user may have previously \ used e.g. _vec_len (v) -= 10 */ \ - memset ((V) + _v(l), 0, (1 + (_v(i) - _v(l))) * sizeof ((V)[0])); \ + clib_memset ((V) + _v(l), 0, (1 + (_v(i) - _v(l))) * sizeof ((V)[0])); \ } \ } while (0) @@ -661,7 +661,7 @@ do { \ memmove ((V) + _v(m) + _v(n), \ (V) + _v(m), \ (_v(l) - _v(m)) * sizeof ((V)[0])); \ - memset ((V) + _v(m), INIT, _v(n) * sizeof ((V)[0])); \ + clib_memset ((V) + _v(m), INIT, _v(n) * sizeof ((V)[0])); \ } while (0) /** \brief Insert N vector elements starting at element M, @@ -794,7 +794,7 @@ do { \ (_v(l) - _v(n) - _v(m)) * sizeof ((V)[0])); \ /* Zero empty space at end (for future re-allocation). */ \ if (_v(n) > 0) \ - memset ((V) + _v(l) - _v(n), 0, _v(n) * sizeof ((V)[0])); \ + clib_memset ((V) + _v(l) - _v(n), 0, _v(n) * sizeof ((V)[0])); \ _vec_len (V) -= _v(n); \ } while (0) @@ -883,7 +883,7 @@ do { \ #define vec_zero(var) \ do { \ if (var) \ - memset ((var), 0, vec_len (var) * sizeof ((var)[0])); \ + clib_memset ((var), 0, vec_len (var) * sizeof ((var)[0])); \ } while (0) /** \brief Set all vector elements to given value. Null-pointer tolerant. |