diff options
author | Dave Barach <dave@barachs.net> | 2018-10-17 10:38:51 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-23 13:06:46 +0000 |
commit | b7b929931a07fbb27b43d5cd105f366c3e29807e (patch) | |
tree | 438681c89738802dbb5d339715b96ea2c31bafb4 /src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c | |
parent | b9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff) |
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c')
-rw-r--r-- | src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c index 1fa1c55b00f..73b57f64e90 100644 --- a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c +++ b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c @@ -100,12 +100,12 @@ nsh_md2_ioam_enable_disable_for_dest (vlib_main_t * vm, if (is_ipv4) { - memset (&fib_prefix, 0, sizeof (fib_prefix_t)); + clib_memset (&fib_prefix, 0, sizeof (fib_prefix_t)); fib_prefix.fp_len = 32; fib_prefix.fp_proto = FIB_PROTOCOL_IP4; #define TRANSIT_UNIT_TEST_HACK 1 #ifdef TRANSIT_UNIT_TEST_HACK - memset(&dst_addr, 0, sizeof(dst_addr)); + clib_memset(&dst_addr, 0, sizeof(dst_addr)); dst_addr.ip4.as_u32 = clib_net_to_host_u32(0x14020102); #endif fib_prefix.fp_addr = dst_addr; @@ -226,7 +226,7 @@ u32 fib_path_get_resolving_interface (fib_node_index_t path_index); nsh_md2_ioam_dest_tunnels_t *t1; fib_prefix_t key4, *key4_copy; hash_pair_t *hp; - memset (&key4, 0, sizeof (key4)); + clib_memset (&key4, 0, sizeof (key4)); key4.fp_proto = FIB_PROTOCOL_IP4; key4.fp_addr.ip4.as_u32 = fib_prefix.fp_addr.ip4.as_u32; t = hash_get_mem (hm->dst_by_ip4, &key4); @@ -237,11 +237,11 @@ u32 fib_path_get_resolving_interface (fib_node_index_t path_index); return 0; } pool_get_aligned (hm->dst_tunnels, t1, CLIB_CACHE_LINE_BYTES); - memset (t1, 0, sizeof (*t1)); + clib_memset (t1, 0, sizeof (*t1)); t1->fp_proto = FIB_PROTOCOL_IP4; t1->dst_addr.ip4.as_u32 = fib_prefix.fp_addr.ip4.as_u32; key4_copy = clib_mem_alloc (sizeof (*key4_copy)); - memset(key4_copy, 0, sizeof(*key4_copy)); + clib_memset(key4_copy, 0, sizeof(*key4_copy)); clib_memcpy (key4_copy, &key4, sizeof (*key4_copy)); hash_set_mem (hm->dst_by_ip4, key4_copy, t1 - hm->dst_tunnels); /* |