From 1e4281223ab4d655b54496ae13fbdb68f867e351 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 13 Oct 2021 21:18:59 +0200 Subject: nat: fix coverity warning Fix coverity warning by initialising proto variable to a dummy value. This value is never used because consuming function uses this parameter value only if is_addr_only flag is not set and this flag is always set if proto value is not provided by user. Type: fix Signed-off-by: Klement Sekera Change-Id: I9b5e8c08346bea1e2b460bb09e962c4b8d3b6947 --- src/plugins/nat/nat44-ed/nat44_ed_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/nat/nat44-ed/nat44_ed_cli.c b/src/plugins/nat/nat44-ed/nat44_ed_cli.c index 413c7959962..6f4485ceb51 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed_cli.c +++ b/src/plugins/nat/nat44-ed/nat44_ed_cli.c @@ -983,7 +983,7 @@ add_identity_mapping_command_fn (vlib_main_t * vm, int rv, is_add = 1, port_set = 0; u32 sw_if_index, port, flags, vrf_id = ~0; - nat_protocol_t proto; + nat_protocol_t proto = NAT_PROTOCOL_OTHER; ip4_address_t addr; flags = NAT_SM_FLAG_IDENTITY_NAT; -- cgit 1.2.3-korg