c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/lisp-cp/gid_dictionary.c b/src/vnet/lisp-cp/gid_dictionary.c
index 73aecbe..2d8fbc8 100644
--- a/src/vnet/lisp-cp/gid_dictionary.c
+++ b/src/vnet/lisp-cp/gid_dictionary.c
@@ -305,7 +305,7 @@
if (!src)
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
return ip4_lookup_exact_match (sfib4, 0, &sp);
}
else
@@ -322,7 +322,7 @@
if (!src)
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
ip_prefix_version (&sp) = IP6;
return ip6_lookup_exact_match (sfib6, 0, &sp);
}
@@ -557,8 +557,8 @@
{
uword i;
- memset (db->ip4_prefix_len_refcount, 0,
- sizeof (db->ip4_prefix_len_refcount));
+ clib_memset (db->ip4_prefix_len_refcount, 0,
+ sizeof (db->ip4_prefix_len_refcount));
for (i = 0; i < ARRAY_LEN (db->ip4_fib_masks); i++)
{
@@ -606,7 +606,7 @@
else
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
add_del_ip4_key (sfib, 0 /* vni */ , &sp, val, is_add);
}
}
@@ -622,7 +622,7 @@
else
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
old_val =
add_del_ip4_key (sfib, 0 /* vni */ , &sp, val, is_add);
}
@@ -638,7 +638,7 @@
else
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
old_val = add_del_ip4_key (sfib, 0, &sp, 0, is_add);
}
@@ -755,8 +755,8 @@
{
uword i;
- memset (db->ip6_prefix_len_refcount, 0,
- sizeof (db->ip6_prefix_len_refcount));
+ clib_memset (db->ip6_prefix_len_refcount, 0,
+ sizeof (db->ip6_prefix_len_refcount));
for (i = 0; i < ARRAY_LEN (db->ip6_fib_masks); i++)
{
@@ -809,7 +809,7 @@
else
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
ip_prefix_version (&sp) = IP6;
add_del_ip6_key (sfib, 0 /* vni */ , &sp, val, is_add);
}
@@ -826,7 +826,7 @@
else
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
ip_prefix_version (&sp) = IP6;
old_val =
add_del_ip6_key (sfib, 0 /* vni */ , &sp, val, is_add);
@@ -843,7 +843,7 @@
else
{
ip_prefix_t sp;
- memset (&sp, 0, sizeof (sp));
+ clib_memset (&sp, 0, sizeof (sp));
ip_prefix_version (&sp) = IP6;
old_val = add_del_ip6_key (sfib, 0, &sp, 0, is_add);
}