aboutsummaryrefslogtreecommitdiffstats
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);