summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/crypto_test.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-02-24 20:56:49 +0000
committerNeale Ranns <nranns@cisco.com>2020-02-25 10:45:41 +0000
commit719ef39d988182d1297dc9c3f06b7bbda3043d47 (patch)
tree48c7fad9d30a2aa807d0f126c217a9cc73c32dff /src/plugins/unittest/crypto_test.c
parent41e831f5588fe5ebfd879f4e570e85e12770b360 (diff)
crypto: fix coverity warnings
Type: fix Change-Id: I89c0923ad6ac1daf65b2d24ad4b6f00b7703e58e Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/unittest/crypto_test.c')
-rw-r--r--src/plugins/unittest/crypto_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/unittest/crypto_test.c b/src/plugins/unittest/crypto_test.c
index 16c87a28c00..f08b253dd19 100644
--- a/src/plugins/unittest/crypto_test.c
+++ b/src/plugins/unittest/crypto_test.c
@@ -207,7 +207,6 @@ generate_digest (vlib_main_t * vm,
static int
restore_engines (u32 * engs)
{
- return 0;
vnet_crypto_main_t *cm = &crypto_main;
u32 i;
vnet_crypto_engine_t *ce;
@@ -230,7 +229,6 @@ restore_engines (u32 * engs)
static int
save_current_engines (u32 * engs)
{
- return 0;
vnet_crypto_main_t *cm = &crypto_main;
uword *p;
u32 i;
@@ -536,6 +534,7 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm,
op->chunk_index = vec_len (chunks);
while (pt->data)
{
+ clib_memset (&ch, 0, sizeof (ch));
ch.src = pt->data;
ch.len = pt->length;
ch.dst = computed_data + computed_data_total_len;
@@ -554,6 +553,7 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm,
op->chunk_index = vec_len (chunks);
while (ct->data)
{
+ clib_memset (&ch, 0, sizeof (ch));
ch.src = ct->data;
ch.len = ct->length;
ch.dst = computed_data + computed_data_total_len;
@@ -608,6 +608,7 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm,
op->chunk_index = vec_len (chunks);
while (pt->data)
{
+ clib_memset (&ch, 0, sizeof (ch));
ch.src = pt->data;
ch.len = pt->length;
vec_add1 (chunks, ch);
/* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __included_tw_timer_2t_1w_2048sl_h__
#define __included_tw_timer_2t_1w_2048sl_h__

/* ... So that a client app can create multiple wheel geometries */
#undef TW_TIMER_WHEELS
#undef TW_SLOTS_PER_RING
#undef TW_RING_SHIFT
#undef TW_RING_MASK
#undef TW_TIMERS_PER_OBJECT
#undef LOG2_TW_TIMERS_PER_OBJECT
#undef TW_SUFFIX

#define TW_TIMER_WHEELS 1
#define TW_SLOTS_PER_RING 2048
#define TW_RING_SHIFT 11
#define TW_RING_MASK (TW_SLOTS_PER_RING -1)
#define TW_TIMERS_PER_OBJECT 2
#define LOG2_TW_TIMERS_PER_OBJECT 1
#define TW_SUFFIX _2t_1w_2048sl

#include <vppinfra/tw_timer_template.h>

#endif /* __included_tw_timer_2t_1w_2048sl_h__ */

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */