From 93149bb4cd0a137b2a6da4b0d9f8cb2032e44734 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 15 Nov 2017 10:44:07 -0800 Subject: BIER: coverity fixes Change-Id: I657bade082f9f754b294cd5f23ecfad4f0f46265 Signed-off-by: Neale Ranns --- src/vnet/fib/fib_test.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/vnet/fib') diff --git a/src/vnet/fib/fib_test.c b/src/vnet/fib/fib_test.c index b74ec337c1f..555196d0092 100644 --- a/src/vnet/fib/fib_test.c +++ b/src/vnet/fib/fib_test.c @@ -612,12 +612,18 @@ fib_test_validate_lb (const dpo_id_t *dpo, va_start(ap, n_buckets); - FIB_TEST_LB((DPO_LOAD_BALANCE == dpo->dpoi_type), - "Entry links to %U", - format_dpo_type, dpo->dpoi_type); - lb = load_balance_get(dpo->dpoi_index); + if (FIB_TEST_I((DPO_LOAD_BALANCE == dpo->dpoi_type), + "Entry links to %U", + format_dpo_type, dpo->dpoi_type)) + { + lb = load_balance_get(dpo->dpoi_index); - res = fib_test_validate_lb_v(lb, n_buckets, &ap); + res = fib_test_validate_lb_v(lb, n_buckets, &ap); + } + else + { + res = !0; + } va_end(ap); -- cgit 1.2.3-korg