lb: fix coverity warning

Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e
(cherry picked from commit a53068905e)
This commit is contained in:
Dave Barach
2020-03-10 07:13:20 -04:00
committed by Andrew Yourtchenko
parent 458ab69af3
commit 69f3a473bc

View File

@ -904,7 +904,7 @@ static void lb_vip_add_adjacency(lb_main_t *lbm, lb_vip_t *vip,
vip->protocol, vip->port, &vip_idx))
{
lb_vip_t *exists_vip = lb_vip_get_by_index(vip_idx);
*vip_prefix_index = exists_vip->vip_prefix_index;
*vip_prefix_index = exists_vip ? exists_vip->vip_prefix_index : ~0;
return;
}