c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/dhcp/client.c b/src/vnet/dhcp/client.c
index 98f2123..3233305 100644
--- a/src/vnet/dhcp/client.c
+++ b/src/vnet/dhcp/client.c
@@ -422,7 +422,7 @@
dhcp = (dhcp_header_t *) (udp + 1);
/* $$$ optimize, maybe */
- memset (ip, 0, sizeof (*ip) + sizeof (*udp) + sizeof (*dhcp));
+ clib_memset (ip, 0, sizeof (*ip) + sizeof (*udp) + sizeof (*dhcp));
ip->ip_version_and_header_length = 0x45;
ip->ttl = 128;
@@ -908,7 +908,7 @@
if (a->is_add)
{
pool_get (dcm->clients, c);
- memset (c, 0, sizeof (*c));
+ clib_memset (c, 0, sizeof (*c));
c->state = DHCP_DISCOVER;
c->sw_if_index = a->sw_if_index;
c->client_index = a->client_index;
@@ -984,7 +984,7 @@
dhcp_client_add_del_args_t _a, *a = &_a;
int rv;
- memset (a, 0, sizeof (*a));
+ clib_memset (a, 0, sizeof (*a));
a->is_add = is_add;
a->sw_if_index = sw_if_index;
a->client_index = client_index;
@@ -1106,7 +1106,7 @@
if (sw_if_index_set == 0)
return clib_error_return (0, "interface not specified");
- memset (a, 0, sizeof (*a));
+ clib_memset (a, 0, sizeof (*a));
a->is_add = is_add;
a->sw_if_index = sw_if_index;
a->hostname = hostname;