aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo_segment.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/svm/svm_fifo_segment.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/svm/svm_fifo_segment.c')
-rw-r--r--src/svm/svm_fifo_segment.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/svm/svm_fifo_segment.c b/src/svm/svm_fifo_segment.c
index dcfc0dffb80..a42225c8345 100644
--- a/src/svm/svm_fifo_segment.c
+++ b/src/svm/svm_fifo_segment.c
@@ -190,7 +190,7 @@ svm_fifo_segment_init (svm_fifo_segment_private_t * s)
oldheap = ssvm_push_heap (sh);
fsh = clib_mem_alloc (sizeof (*fsh));
- memset (fsh, 0, sizeof (*fsh));
+ clib_memset (fsh, 0, sizeof (*fsh));
s->h = sh->opaque[0] = fsh;
ssvm_pop_heap (oldheap);
@@ -211,7 +211,7 @@ svm_fifo_segment_create (svm_fifo_segment_create_args_t * a)
/* Allocate a fresh segment */
pool_get (sm->segments, s);
- memset (s, 0, sizeof (*s));
+ clib_memset (s, 0, sizeof (*s));
s->ssvm.ssvm_size = a->segment_size;
s->ssvm.i_am_master = 1;
@@ -247,7 +247,7 @@ svm_fifo_segment_create_process_private (svm_fifo_segment_create_args_t * a)
u32 pagesize = clib_mem_get_page_size ();
pool_get (sm->segments, s);
- memset (s, 0, sizeof (*s));
+ clib_memset (s, 0, sizeof (*s));
rnd_size = (a->segment_size + (pagesize - 1)) & ~pagesize;
@@ -278,7 +278,7 @@ svm_fifo_segment_create_process_private (svm_fifo_segment_create_args_t * a)
sh = clib_mem_alloc_aligned (sizeof (*sh), CLIB_CACHE_LINE_BYTES);
s->ssvm.sh = sh;
- memset (sh, 0, sizeof (*sh));
+ clib_memset (sh, 0, sizeof (*sh));
sh->heap = heap;
svm_fifo_segment_init (s);
@@ -299,7 +299,7 @@ svm_fifo_segment_attach (svm_fifo_segment_create_args_t * a)
/* Allocate a fresh segment */
pool_get (sm->segments, s);
- memset (s, 0, sizeof (*s));
+ clib_memset (s, 0, sizeof (*s));
s->ssvm.ssvm_size = a->segment_size;
s->ssvm.my_pid = getpid ();
@@ -329,7 +329,7 @@ svm_fifo_segment_delete (svm_fifo_segment_private_t * s)
svm_fifo_segment_main_t *sm = &svm_fifo_segment_main;
ssvm_delete (&s->ssvm);
- memset (s, 0xfe, sizeof (*s));
+ clib_memset (s, 0xfe, sizeof (*s));
pool_put (sm->segments, s);
}
@@ -387,7 +387,7 @@ svm_fifo_segment_alloc_fifo (svm_fifo_segment_private_t * s,
{
fsh->free_fifos[freelist_index] = f->next;
/* (re)initialize the fifo, as in svm_fifo_create */
- memset (f, 0, sizeof (*f));
+ clib_memset (f, 0, sizeof (*f));
f->nitems = data_size_in_bytes;
f->ooos_list_head = OOO_SEGMENT_INVALID_INDEX;
f->ct_session_index = SVM_FIFO_INVALID_SESSION_INDEX;