From b7b929931a07fbb27b43d5cd105f366c3e29807e Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 17 Oct 2018 10:38:51 -0400 Subject: c11 safe string handling support Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach --- src/vppinfra/tw_timer_template.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vppinfra/tw_timer_template.c') diff --git a/src/vppinfra/tw_timer_template.c b/src/vppinfra/tw_timer_template.c index 9c9bb977d5e..11a38890f9c 100644 --- a/src/vppinfra/tw_timer_template.c +++ b/src/vppinfra/tw_timer_template.c @@ -301,7 +301,7 @@ TW (tw_timer_start) (TWT (tw_timer_wheel) * tw, u32 user_id, u32 timer_id, ASSERT (interval); pool_get (tw->timers, t); - memset (t, 0xff, sizeof (*t)); + clib_memset (t, 0xff, sizeof (*t)); t->user_handle = TW (make_internal_timer_handle) (user_id, timer_id); @@ -411,7 +411,7 @@ TW (tw_timer_wheel_init) (TWT (tw_timer_wheel) * tw, int ring, slot; tw_timer_wheel_slot_t *ts; TWT (tw_timer) * t; - memset (tw, 0, sizeof (*tw)); + clib_memset (tw, 0, sizeof (*tw)); tw->expired_timer_callback = expired_timer_callback; tw->max_expirations = max_expirations; if (timer_interval_in_seconds == 0.0) @@ -432,7 +432,7 @@ TW (tw_timer_wheel_init) (TWT (tw_timer_wheel) * tw, { ts = &tw->w[ring][slot]; pool_get (tw->timers, t); - memset (t, 0xff, sizeof (*t)); + clib_memset (t, 0xff, sizeof (*t)); t->next = t->prev = t - tw->timers; ts->head_index = t - tw->timers; } @@ -441,7 +441,7 @@ TW (tw_timer_wheel_init) (TWT (tw_timer_wheel) * tw, #if TW_OVERFLOW_VECTOR > 0 ts = &tw->overflow; pool_get (tw->timers, t); - memset (t, 0xff, sizeof (*t)); + clib_memset (t, 0xff, sizeof (*t)); t->next = t->prev = t - tw->timers; ts->head_index = t - tw->timers; #endif @@ -490,7 +490,7 @@ void TW (tw_timer_wheel_free) (TWT (tw_timer_wheel) * tw) pool_put (tw->timers, head); #endif - memset (tw, 0, sizeof (*tw)); + clib_memset (tw, 0, sizeof (*tw)); } /** -- cgit 1.2.3-korg