c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index f810ae5..2d6cd01 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -409,7 +409,7 @@
{
uword *p;
- memset (key, 0, sizeof (*key));
+ clib_memset (key, 0, sizeof (*key));
if (GID_ADDR_IP_PREFIX == gid_address_type (&a->rmt_eid))
{
@@ -486,7 +486,7 @@
if (LISP_GPE_FWD_ENTRY_TYPE_NORMAL != lfe->type)
return;
- memset (&key, 0, sizeof (key));
+ clib_memset (&key, 0, sizeof (key));
key.fwd_entry_index = fwd_entry_index;
vec_foreach (path, lfe->paths)
@@ -531,7 +531,7 @@
return VNET_API_ERROR_INVALID_VALUE;
pool_get (lgm->lisp_fwd_entry_pool, lfe);
- memset (lfe, 0, sizeof (*lfe));
+ clib_memset (lfe, 0, sizeof (*lfe));
lfe->key = clib_mem_alloc (sizeof (key));
memcpy (lfe->key, &key, sizeof (key));
@@ -848,7 +848,7 @@
return VNET_API_ERROR_INVALID_VALUE;
pool_get (lgm->lisp_fwd_entry_pool, lfe);
- memset (lfe, 0, sizeof (*lfe));
+ clib_memset (lfe, 0, sizeof (*lfe));
lfe->key = clib_mem_alloc (sizeof (key));
memcpy (lfe->key, &key, sizeof (key));
@@ -916,7 +916,7 @@
int rv;
BVT (clib_bihash_kv) kv, value;
- memset (&kv, 0, sizeof (kv));
+ clib_memset (&kv, 0, sizeof (kv));
kv.key[0] = spi_si_net_order;
rv = BV (clib_bihash_search_inline_2) (&lgm->nsh_fib, &kv, &value);
@@ -951,7 +951,7 @@
BVT (clib_bihash_kv) kv, value;
u32 old_val = ~0;
- memset (&kv, 0, sizeof (kv));
+ clib_memset (&kv, 0, sizeof (kv));
kv.key[0] = clib_host_to_net_u32 (spi_si_host_order);
kv.value = 0ULL;
@@ -1123,7 +1123,7 @@
return VNET_API_ERROR_INVALID_VALUE;
pool_get (lgm->lisp_fwd_entry_pool, lfe);
- memset (lfe, 0, sizeof (*lfe));
+ clib_memset (lfe, 0, sizeof (*lfe));
lfe->key = clib_mem_alloc (sizeof (key));
memcpy (lfe->key, &key, sizeof (key));
@@ -1307,7 +1307,7 @@
uword *p;
u8 *s;
- memset (&key, 0, sizeof (key));
+ clib_memset (&key, 0, sizeof (key));
key.fwd_entry_index = fwd_entry_index;
key.tunnel_index = ti;
@@ -1543,7 +1543,7 @@
({
if (lfe->key->vni == vni)
{
- memset (&e, 0, sizeof (e));
+ clib_memset (&e, 0, sizeof (e));
e.dp_table = lfe->eid_table_id;
e.vni = lfe->key->vni;
if (lfe->type == LISP_GPE_FWD_ENTRY_TYPE_NEGATIVE)