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_api.c b/src/vnet/lisp-gpe/lisp_gpe_api.c
index 97409f5..86328fc 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_api.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_api.c
@@ -74,7 +74,7 @@
{
/* local locator */
r = &((vl_api_gpe_locator_t *) locs)[i];
- memset (&pair, 0, sizeof (pair));
+ clib_memset (&pair, 0, sizeof (pair));
ip_address_set (&pair.lcl_loc, &r->addr, r->is_ip4 ? IP4 : IP6);
pair.weight = r->weight;
@@ -174,7 +174,7 @@
vec_foreach (path, lfe->paths)
{
rmp = vl_msg_api_alloc (sizeof (*rmp));
- memset (rmp, 0, sizeof (*rmp));
+ clib_memset (rmp, 0, sizeof (*rmp));
const lisp_gpe_tunnel_t *lgt;
rmp->_vl_msg_id =
@@ -200,7 +200,7 @@
vec_foreach (e, src)
{
- memset (&dst[i], 0, sizeof (*dst));
+ clib_memset (&dst[i], 0, sizeof (*dst));
dst[i].dp_table = e->dp_table;
dst[i].fwd_entry_index = e->fwd_entry_index;
dst[i].vni = e->vni;
@@ -332,7 +332,7 @@
int rv = 0;
gpe_add_del_fwd_entry_t_net_to_host (mp);
- memset (a, 0, sizeof (a[0]));
+ clib_memset (a, 0, sizeof (a[0]));
rv = unformat_lisp_eid_api (&a->rmt_eid, mp->vni, mp->eid_type,
mp->rmt_eid, mp->rmt_len);
@@ -447,7 +447,7 @@
vnet_gpe_native_fwd_rpath_args_t _a, *a = &_a;
int rv = 0;
- memset (a, 0, sizeof (a[0]));
+ clib_memset (a, 0, sizeof (a[0]));
if (mp->is_ip4)
clib_memcpy (&a->rpath.frp_addr.ip4, mp->nh_addr, sizeof (ip4_address_t));
@@ -483,7 +483,7 @@
vec_foreach (e, src)
{
- memset (&dst[i], 0, sizeof (*dst));
+ clib_memset (&dst[i], 0, sizeof (*dst));
table = fib_table_get (e->frp_fib_index, dpo_proto_to_fib (e->frp_proto));
dst[i].fib_index = table->ft_table_id;
dst[i].nh_sw_if_index = e->frp_sw_if_index;