summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-12-10 05:32:31 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-12-10 20:29:47 +0000
commit765b82ba962496fde62c355cd579dfb75f45e093 (patch)
treed26cc12c505e8ba47fbf073f21cd4676c6b85a46
parent4e671d20c8bc6a45ff703625d78f6703c62094b7 (diff)
BIER coverity Fix
Change-Id: I17f95775756b8fd5ee390432f6d8041abbd9f974 Signed-off-by: Neale Ranns <nranns@cisco.com>
-rw-r--r--src/vnet/bier/bier_test.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/bier/bier_test.c b/src/vnet/bier/bier_test.c
index cf75c2eb072..0fbca7e7b9b 100644
--- a/src/vnet/bier/bier_test.c
+++ b/src/vnet/bier/bier_test.c
@@ -170,15 +170,17 @@ bier_test_validate_entry (index_t bei,
bier_entry_contribute_forwarding(bei, &dpo);
- BIER_TEST_LB((DPO_LOAD_BALANCE == dpo.dpoi_type),
- "Entry links to %U",
- format_dpo_type, dpo.dpoi_type);
+ res = BIER_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);
+ if (res)
+ {
+ lb = load_balance_get(dpo.dpoi_index);
+ res = fib_test_validate_lb_v(lb, n_buckets, &ap);
+ }
dpo_reset(&dpo);
-
va_end(ap);
return (res);