summaryrefslogtreecommitdiffstats
path: root/src/tools/perftool/cpel_util.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/tools/perftool/cpel_util.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/tools/perftool/cpel_util.c')
-rw-r--r--src/tools/perftool/cpel_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/perftool/cpel_util.c b/src/tools/perftool/cpel_util.c
index 7ee9b6e2a00..4f5f98a51cc 100644
--- a/src/tools/perftool/cpel_util.c
+++ b/src/tools/perftool/cpel_util.c
@@ -210,7 +210,7 @@ int write_event_defs(FILE *ofp)
if (fwrite(&sh, sizeof(sh), 1, ofp) != 1)
return(0);
- memset(&edsh, 0, sizeof(edsh));
+ clib_memset(&edsh, 0, sizeof(edsh));
strcpy(edsh.string_table_name, "FileStrtab");
edsh.number_of_event_definitions = ntohl(vec_len(the_event_definitions));
@@ -274,7 +274,7 @@ int write_events(FILE *ofp, u64 clock_ticks_per_second)
if (fwrite(&sh, sizeof(sh), 1, ofp) != 1)
return(0);
- memset(&eh, 0, sizeof(eh));
+ clib_memset(&eh, 0, sizeof(eh));
strcpy(eh.string_table_name, "FileStrtab");
eh.number_of_events = ntohl(number_of_events);
eh.clock_ticks_per_second = ntohl(clock_ticks_per_second);
@@ -322,7 +322,7 @@ int write_track_defs(FILE *ofp)
if (fwrite(&sh, sizeof(sh), 1, ofp) != 1)
return(0);
- memset(&tdsh, 0, sizeof(tdsh));
+ clib_memset(&tdsh, 0, sizeof(tdsh));
strcpy(tdsh.string_table_name, "FileStrtab");
tdsh.number_of_track_definitions = ntohl(vec_len(the_tracks));