c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c
index 14ab36d..3ee33ea 100644
--- a/src/vnet/session-apps/echo_server.c
+++ b/src/vnet/session-apps/echo_server.c
@@ -287,8 +287,8 @@
u64 options[APP_OPTIONS_N_OPTIONS];
u32 segment_size = 512 << 20;
- memset (a, 0, sizeof (*a));
- memset (options, 0, sizeof (options));
+ clib_memset (a, 0, sizeof (*a));
+ clib_memset (options, 0, sizeof (options));
if (esm->no_echo)
echo_server_session_cb_vft.builtin_app_rx_callback =
@@ -327,13 +327,13 @@
}
esm->app_index = a->app_index;
- memset (a_cert, 0, sizeof (*a_cert));
+ clib_memset (a_cert, 0, sizeof (*a_cert));
a_cert->app_index = a->app_index;
vec_validate (a_cert->cert, test_srv_crt_rsa_len);
clib_memcpy (a_cert->cert, test_srv_crt_rsa, test_srv_crt_rsa_len);
vnet_app_add_tls_cert (a_cert);
- memset (a_key, 0, sizeof (*a_key));
+ clib_memset (a_key, 0, sizeof (*a_key));
a_key->app_index = a->app_index;
vec_validate (a_key->key, test_srv_key_rsa_len);
clib_memcpy (a_key->key, test_srv_key_rsa, test_srv_key_rsa_len);
@@ -359,7 +359,7 @@
{
echo_server_main_t *esm = &echo_server_main;
vnet_bind_args_t _a, *a = &_a;
- memset (a, 0, sizeof (*a));
+ clib_memset (a, 0, sizeof (*a));
a->app_index = esm->app_index;
a->uri = esm->server_uri;
return vnet_bind_uri (a);