aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-17 10:38:51 -0400
committerDamjan Marion <dmarion@me.com>2018-10-23 13:06:46 +0000
commitb7b929931a07fbb27b43d5cd105f366c3e29807e (patch)
tree438681c89738802dbb5d339715b96ea2c31bafb4 /src/vnet/session/application.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index fad3e1c2292..90c067d6d31 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -25,7 +25,7 @@ app_listener_alloc (application_t * app)
{
app_listener_t *app_listener;
pool_get (app->listeners, app_listener);
- memset (app_listener, 0, sizeof (*app_listener));
+ clib_memset (app_listener, 0, sizeof (*app_listener));
app_listener->al_index = app_listener - app->listeners;
return app_listener;
}
@@ -42,7 +42,7 @@ app_listener_free (application_t * app, app_listener_t * app_listener)
clib_bitmap_free (app_listener->workers);
pool_put (app->listeners, app_listener);
if (CLIB_DEBUG)
- memset (app_listener, 0xfa, sizeof (*app_listener));
+ clib_memset (app_listener, 0xfa, sizeof (*app_listener));
}
static app_listener_t *
@@ -50,7 +50,7 @@ app_local_listener_alloc (application_t * app)
{
app_listener_t *app_listener;
pool_get (app->local_listeners, app_listener);
- memset (app_listener, 0, sizeof (*app_listener));
+ clib_memset (app_listener, 0, sizeof (*app_listener));
app_listener->al_index = app_listener - app->local_listeners;
return app_listener;
}
@@ -67,7 +67,7 @@ app_local_listener_free (application_t * app, app_listener_t * app_listener)
clib_bitmap_free (app_listener->workers);
pool_put (app->local_listeners, app_listener);
if (CLIB_DEBUG)
- memset (app_listener, 0xfa, sizeof (*app_listener));
+ clib_memset (app_listener, 0xfa, sizeof (*app_listener));
}
static app_worker_map_t *
@@ -75,7 +75,7 @@ app_worker_map_alloc (application_t * app)
{
app_worker_map_t *map;
pool_get (app->worker_maps, map);
- memset (map, 0, sizeof (*map));
+ clib_memset (map, 0, sizeof (*map));
return map;
}
@@ -234,7 +234,7 @@ application_alloc (void)
{
application_t *app;
pool_get (app_main.app_pool, app);
- memset (app, 0, sizeof (*app));
+ clib_memset (app, 0, sizeof (*app));
app->app_index = app - app_main.app_pool;
return app;
}
@@ -484,7 +484,7 @@ app_worker_alloc (application_t * app)
{
app_worker_t *app_wrk;
pool_get (app_main.workers, app_wrk);
- memset (app_wrk, 0, sizeof (*app_wrk));
+ clib_memset (app_wrk, 0, sizeof (*app_wrk));
app_wrk->wrk_index = app_wrk - app_main.workers;
app_wrk->app_index = app->app_index;
app_wrk->wrk_map_index = ~0;
@@ -572,7 +572,7 @@ app_worker_free (app_worker_t * app_wrk)
pool_put (app_main.workers, app_wrk);
if (CLIB_DEBUG)
- memset (app_wrk, 0xfe, sizeof (*app_wrk));
+ clib_memset (app_wrk, 0xfe, sizeof (*app_wrk));
}
int
@@ -1347,7 +1347,7 @@ application_local_session_alloc (app_worker_t * app_wrk)
{
local_session_t *s;
pool_get (app_wrk->local_sessions, s);
- memset (s, 0, sizeof (*s));
+ clib_memset (s, 0, sizeof (*s));
s->app_wrk_index = app_wrk->wrk_index;
s->session_index = s - app_wrk->local_sessions;
s->session_type = session_type_from_proto_and_ip (TRANSPORT_PROTO_NONE, 0);
@@ -1359,7 +1359,7 @@ application_local_session_free (app_worker_t * app, local_session_t * s)
{
pool_put (app->local_sessions, s);
if (CLIB_DEBUG)
- memset (s, 0xfc, sizeof (*s));
+ clib_memset (s, 0xfc, sizeof (*s));
}
local_session_t *
@@ -1387,7 +1387,7 @@ application_local_listen_session_alloc (application_t * app)
{
local_session_t *ll;
pool_get (app->local_listen_sessions, ll);
- memset (ll, 0, sizeof (*ll));
+ clib_memset (ll, 0, sizeof (*ll));
return ll;
}
@@ -1403,7 +1403,7 @@ application_local_listen_session_free (application_t * app,
{
pool_put (app->local_listen_sessions, ll);
if (CLIB_DEBUG)
- memset (ll, 0xfb, sizeof (*ll));
+ clib_memset (ll, 0xfb, sizeof (*ll));
}
int