From 0224514c28bdee05ea11a89a721c810e5f99ede2 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 13 May 2019 23:07:43 -0700 Subject: IPSEC coverity fixes Change-Id: I753fbce091c0ba1004690be5ddeb04f463cf95a3 Signed-off-by: Neale Ranns --- src/vnet/ipsec/ipsec.c | 2 +- src/vnet/ipsec/ipsec_cli.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c index 4e69e734702..10b8bf65bd5 100644 --- a/src/vnet/ipsec/ipsec.c +++ b/src/vnet/ipsec/ipsec.c @@ -107,7 +107,7 @@ ipsec_add_feature (const char *arc_name, u8 arc; arc = vnet_get_feature_arc_index (arc_name); - ASSERT (arc != ~0); + ASSERT (arc != (u8) ~ 0); *out_feature_index = vnet_get_feature_index (arc, node_name); } diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c index 46912147bbd..38a2fed4587 100644 --- a/src/vnet/ipsec/ipsec_cli.c +++ b/src/vnet/ipsec/ipsec_cli.c @@ -375,8 +375,10 @@ set_ipsec_sa_key_command_fn (vlib_main_t * vm, vlib_cli_command_t * cmd) { unformat_input_t _line_input, *line_input = &_line_input; + ipsec_key_t ck = { }, ik = + { + }; clib_error_t *error = NULL; - ipsec_key_t ck, ik; u32 id; if (!unformat_user (input, unformat_line_input, line_input)) -- cgit 1.2.3-korg