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 <ksekera@cisco.com>
Change-Id: I9b5e8c08346bea1e2b460bb09e962c4b8d3b6947
This commit is contained in:
Klement Sekera
2021-10-13 21:18:59 +02:00
parent d4a70647e6
commit 1e4281223a

View File

@ -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;