summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/serialize.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/vppinfra/serialize.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/serialize.c')
-rw-r--r--src/vppinfra/serialize.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vppinfra/serialize.c b/src/vppinfra/serialize.c
index a098aa2d98a..ef9cf03f362 100644
--- a/src/vppinfra/serialize.c
+++ b/src/vppinfra/serialize.c
@@ -572,7 +572,7 @@ unserialize_heap (serialize_main_t * m, va_list * va)
return;
}
- memset (&h, 0, sizeof (h));
+ clib_memset (&h, 0, sizeof (h));
#define _(f) unserialize_integer (m, &h.f, sizeof (h.f));
foreach_serialize_heap_header_integer;
#undef _
@@ -882,7 +882,7 @@ unserialize_close (serialize_main_t * m)
void
serialize_open_data (serialize_main_t * m, u8 * data, uword n_data_bytes)
{
- memset (m, 0, sizeof (m[0]));
+ clib_memset (m, 0, sizeof (m[0]));
m->stream.buffer = data;
m->stream.n_buffer_bytes = n_data_bytes;
}
@@ -908,7 +908,7 @@ serialize_vector_write (serialize_main_header_t * m, serialize_stream_t * s)
void
serialize_open_vector (serialize_main_t * m, u8 * vector)
{
- memset (m, 0, sizeof (m[0]));
+ clib_memset (m, 0, sizeof (m[0]));
m->header.data_function = serialize_vector_write;
m->stream.buffer = vector;
m->stream.current_buffer_index = 0;
@@ -926,7 +926,7 @@ serialize_close_vector (serialize_main_t * m)
if (s->buffer)
_vec_len (s->buffer) = s->current_buffer_index;
result = s->buffer;
- memset (m, 0, sizeof (m[0]));
+ clib_memset (m, 0, sizeof (m[0]));
return result;
}
@@ -1192,7 +1192,7 @@ static void
serialize_open_clib_file_descriptor_helper (serialize_main_t * m, int fd,
uword is_read)
{
- memset (m, 0, sizeof (m[0]));
+ clib_memset (m, 0, sizeof (m[0]));
vec_resize (m->stream.buffer, 4096);
if (!is_read)