From b7b929931a07fbb27b43d5cd105f366c3e29807e Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 17 Oct 2018 10:38:51 -0400 Subject: c11 safe string handling support Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach --- src/vnet/policer/xlate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/vnet/policer/xlate.c') diff --git a/src/vnet/policer/xlate.c b/src/vnet/policer/xlate.c index 5905aa53351..afc0c05c376 100644 --- a/src/vnet/policer/xlate.c +++ b/src/vnet/policer/xlate.c @@ -798,7 +798,7 @@ sse2_pol_convert_cfg_to_hw_params (sse2_qos_pol_cfg_params_st * cfg, /* * clear the hw_params */ - memset (hw, 0, sizeof (sse2_qos_pol_hw_params_st)); + clib_memset (hw, 0, sizeof (sse2_qos_pol_hw_params_st)); hw->allow_negative = SSE2_QOS_POL_ALLOW_NEGATIVE; @@ -1174,8 +1174,8 @@ sse2_pol_logical_2_physical (sse2_qos_pol_cfg_params_st * cfg, int rc; sse2_qos_pol_cfg_params_st kbps_cfg; - memset (phys, 0, sizeof (policer_read_response_type_st)); - memset (&kbps_cfg, 0, sizeof (sse2_qos_pol_cfg_params_st)); + clib_memset (phys, 0, sizeof (policer_read_response_type_st)); + clib_memset (&kbps_cfg, 0, sizeof (sse2_qos_pol_cfg_params_st)); if (!cfg) { @@ -1279,7 +1279,7 @@ static void sse2_qos_convert_pol_bucket_to_hw_fmt (policer_read_response_type_st * bkt, sse2_qos_pol_hw_params_st * hw_fmt) { - memset (hw_fmt, 0, sizeof (sse2_qos_pol_hw_params_st)); + clib_memset (hw_fmt, 0, sizeof (sse2_qos_pol_hw_params_st)); #if !defined (INTERNAL_SS) && !defined (X86) hw_fmt->rfc = (u8) bkt->rfc; hw_fmt->allow_negative = (u8) bkt->an; @@ -1436,8 +1436,8 @@ sse2_pol_physical_2_logical (policer_read_response_type_st * phys, sse2_qos_pol_hw_params_st pol_hw; sse2_qos_pol_cfg_params_st kbps_cfg; - memset (&pol_hw, 0, sizeof (sse2_qos_pol_hw_params_st)); - memset (&kbps_cfg, 0, sizeof (sse2_qos_pol_cfg_params_st)); + clib_memset (&pol_hw, 0, sizeof (sse2_qos_pol_hw_params_st)); + clib_memset (&kbps_cfg, 0, sizeof (sse2_qos_pol_cfg_params_st)); if (!phys) { -- cgit 1.2.3-korg