diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2022-08-26 13:59:35 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2022-08-26 14:57:00 +0000 |
commit | a01be735f25a9a4596d3f67ef71a094e601e8b65 (patch) | |
tree | f8727eb87bf4e4c1cea03aa42170fe4acf2ae1dd | |
parent | c8d1c8cfb80f1cf0d6dc128e9beea3fcb5c3d741 (diff) |
linux-cp: fix coverity 216937
Initialize the host_sw_if_index to ~0 so in the error cases
the variable is set to something predictable.
Type: fix
Change-Id: Ic55e4f0cbfa286e85dfb54b89b5321af18a439a1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
-rw-r--r-- | src/plugins/linux-cp/lcp_interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/linux-cp/lcp_interface.c b/src/plugins/linux-cp/lcp_interface.c index 4ca7c0ca631..d629a0686cf 100644 --- a/src/plugins/linux-cp/lcp_interface.c +++ b/src/plugins/linux-cp/lcp_interface.c @@ -778,7 +778,7 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, { vlib_main_t *vm; vnet_main_t *vnm; - u32 vif_index = 0, host_sw_if_index; + u32 vif_index = 0, host_sw_if_index = ~0; const vnet_sw_interface_t *sw; const vnet_hw_interface_t *hw; const lcp_itf_pair_t *lip; |