summaryrefslogtreecommitdiffstats
path: root/src/plugins/map/map.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/plugins/map/map.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/map/map.c')
-rw-r--r--src/plugins/map/map.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c
index f2da818dd7b..13caa368322 100644
--- a/src/plugins/map/map.c
+++ b/src/plugins/map/map.c
@@ -130,7 +130,7 @@ map_create_domain (ip4_address_t * ip4_prefix,
/* Get domain index */
pool_get_aligned (mm->domains, d, CLIB_CACHE_LINE_BYTES);
- memset (d, 0, sizeof (*d));
+ clib_memset (d, 0, sizeof (*d));
*map_domain_index = d - mm->domains;
/* Init domain struct */
@@ -316,7 +316,7 @@ map_add_del_psid (u32 map_domain_index, u16 psid, ip6_address_t * tep,
d->rules = clib_mem_alloc_aligned (l, CLIB_CACHE_LINE_BYTES);
if (!d->rules)
return -1;
- memset (d->rules, 0, l);
+ clib_memset (d->rules, 0, l);
}
if (psid >= (0x1 << d->psid_length))
@@ -332,7 +332,7 @@ map_add_del_psid (u32 map_domain_index, u16 psid, ip6_address_t * tep,
}
else
{
- memset (&d->rules[psid], 0, sizeof (ip6_address_t));
+ clib_memset (&d->rules[psid], 0, sizeof (ip6_address_t));
}
return 0;
}
@@ -745,8 +745,8 @@ map_pre_resolve_command_fn (vlib_main_t * vm,
clib_error_t *error = NULL;
int is_del = 0;
- memset (&ip4nh, 0, sizeof (ip4nh));
- memset (&ip6nh, 0, sizeof (ip6nh));
+ clib_memset (&ip4nh, 0, sizeof (ip4nh));
+ clib_memset (&ip6nh, 0, sizeof (ip6nh));
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
@@ -974,7 +974,7 @@ format_map_domain (u8 * s, va_list * args)
ip6_address_t ip6_prefix;
if (d->rules)
- memset (&ip6_prefix, 0, sizeof (ip6_prefix));
+ clib_memset (&ip6_prefix, 0, sizeof (ip6_prefix));
else
ip6_prefix = d->ip6_prefix;
@@ -1210,8 +1210,8 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input,
int which, i;
vlib_counter_t v;
- memset (total_pkts, 0, sizeof (total_pkts));
- memset (total_bytes, 0, sizeof (total_bytes));
+ clib_memset (total_pkts, 0, sizeof (total_pkts));
+ clib_memset (total_bytes, 0, sizeof (total_bytes));
map_domain_counter_lock (mm);
vec_foreach (cm, mm->domain_counters)