c11 safe string handling support

Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/sctp/sctp.c b/src/vnet/sctp/sctp.c
index f97039c..53b4441 100644
--- a/src/vnet/sctp/sctp.c
+++ b/src/vnet/sctp/sctp.c
@@ -25,7 +25,7 @@
   void *iface_ip;
 
   pool_get (tm->listener_pool, listener);
-  memset (listener, 0, sizeof (*listener));
+  clib_memset (listener, 0, sizeof (*listener));
 
   listener->sub_conn[SCTP_PRIMARY_PATH_IDX].subconn_idx =
     SCTP_PRIMARY_PATH_IDX;
@@ -78,7 +78,7 @@
 
   /* Poison the entry */
   if (CLIB_DEBUG > 0)
-    memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
+    clib_memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
 
   pool_put_index (tm->listener_pool, listener_index);
 }
@@ -424,7 +424,7 @@
   sctp_connection_t *sctp_conn;
 
   pool_get (sctp_main->connections[thread_index], sctp_conn);
-  memset (sctp_conn, 0, sizeof (*sctp_conn));
+  clib_memset (sctp_conn, 0, sizeof (*sctp_conn));
   sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].subconn_idx =
     SCTP_PRIMARY_PATH_IDX;
   sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].c_c_index =
@@ -442,7 +442,7 @@
   sctp_connection_t *sctp_conn = 0;
   ASSERT (vlib_get_thread_index () == 0);
   pool_get (tm->half_open_connections, sctp_conn);
-  memset (sctp_conn, 0, sizeof (*sctp_conn));
+  clib_memset (sctp_conn, 0, sizeof (*sctp_conn));
   sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].c_c_index =
     sctp_conn - tm->half_open_connections;
   sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].subconn_idx =
@@ -537,7 +537,7 @@
 
   /* Poison the entry */
   if (CLIB_DEBUG > 0)
-    memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
+    clib_memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
   pool_put (tm->connections[thread_index], sctp_conn);
 }
 
diff --git a/src/vnet/sctp/sctp.h b/src/vnet/sctp/sctp.h
index 577c2af..c40de10 100644
--- a/src/vnet/sctp/sctp.h
+++ b/src/vnet/sctp/sctp.h
@@ -578,7 +578,7 @@
   pool_put_index (sctp_main->half_open_connections,
 		  tc->sub_conn[SCTP_PRIMARY_PATH_IDX].c_c_index);
   if (CLIB_DEBUG)
-    memset (tc, 0xFA, sizeof (*tc));
+    clib_memset (tc, 0xFA, sizeof (*tc));
   clib_spinlock_unlock_if_init (&sctp_main->half_open_lock);
 }
 
diff --git a/src/vnet/sctp/sctp_output.c b/src/vnet/sctp/sctp_output.c
index 08640a4..2b65d97 100644
--- a/src/vnet/sctp/sctp_output.c
+++ b/src/vnet/sctp/sctp_output.c
@@ -1847,7 +1847,7 @@
 		}
 	      else
 		{
-		  memset (&t0->sctp_header, 0, sizeof (t0->sctp_header));
+		  clib_memset (&t0->sctp_header, 0, sizeof (t0->sctp_header));
 		}
 	      clib_memcpy (&t0->sctp_connection, sctp_conn,
 			   sizeof (t0->sctp_connection));
diff --git a/src/vnet/sctp/sctp_packet.h b/src/vnet/sctp/sctp_packet.h
index 427e2f3..04995aa 100644
--- a/src/vnet/sctp/sctp_packet.h
+++ b/src/vnet/sctp/sctp_packet.h
@@ -951,7 +951,7 @@
 {
   h->param_hdr.length = FQDN_MAX_LENGTH;
   h->param_hdr.type = clib_host_to_net_u16 (SCTP_HOSTNAME_ADDRESS_TYPE);
-  memset (h->hostname, '0', FQDN_MAX_LENGTH);
+  clib_memset (h->hostname, '0', FQDN_MAX_LENGTH);
   memcpy (h->hostname, hostname, FQDN_MAX_LENGTH);
 }