summaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.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/vlib/buffer.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r--src/vlib/buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 785fa9b8aac..ee76290e25a 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -377,7 +377,7 @@ vlib_buffer_create_free_list_helper (vlib_main_t * vm,
pool_get_aligned (vm->buffer_free_list_pool, f, CLIB_CACHE_LINE_BYTES);
- memset (f, 0, sizeof (f[0]));
+ clib_memset (f, 0, sizeof (f[0]));
f->index = f - vm->buffer_free_list_pool;
f->n_data_bytes = vlib_buffer_round_size (n_data_bytes);
f->min_n_buffers_each_alloc = VLIB_FRAME_SIZE;
@@ -439,7 +439,7 @@ del_free_list (vlib_main_t * vm, vlib_buffer_free_list_t * f)
vec_free (f->buffers);
/* Poison it. */
- memset (f, 0xab, sizeof (f[0]));
+ clib_memset (f, 0xab, sizeof (f[0]));
}
/* Add buffer free list. */
@@ -544,7 +544,7 @@ vlib_buffer_fill_free_list_internal (vlib_main_t * vm,
if (CLIB_DEBUG > 0)
vlib_buffer_set_known_state (bi[0], VLIB_BUFFER_KNOWN_FREE);
- memset (b, 0, sizeof (vlib_buffer_t));
+ clib_memset (b, 0, sizeof (vlib_buffer_t));
vlib_buffer_init_for_free_list (b, fl);
if (fl->buffer_init_function)
@@ -709,7 +709,7 @@ vlib_packet_template_init (vlib_main_t * vm,
vlib_worker_thread_barrier_sync (vm);
- memset (t, 0, sizeof (t[0]));
+ clib_memset (t, 0, sizeof (t[0]));
vec_add (t->packet_data, packet_data, n_packet_data_bytes);
t->min_n_buffers_each_alloc = min_n_buffers_each_alloc;