aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib/mfib_test.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-01-30 06:44:58 -0800
committerOle Trøan <otroan@employees.org>2017-01-31 12:31:59 +0000
commit05b2bf2e31a90d97425230dcbf2bca6df54519ff (patch)
treef960625681b74ff857e365eac0ddaa3e782282c8 /src/vnet/mfib/mfib_test.c
parent676112f81e52cd91c88a7ab985e957bd64baafd0 (diff)
MFIB Coverity warnings. The lock macro is functionally equivalent but more expressive (and might appease coverity)
Change-Id: Ie3c9b2896a487a0302903bfbdd6348f6f091c67d Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/mfib/mfib_test.c')
-rw-r--r--src/vnet/mfib/mfib_test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/mfib/mfib_test.c b/src/vnet/mfib/mfib_test.c
index 8735bfa73fc..8082a6bb606 100644
--- a/src/vnet/mfib/mfib_test.c
+++ b/src/vnet/mfib/mfib_test.c
@@ -235,6 +235,7 @@ mfib_test_entry (fib_node_index_t fei,
const replicate_t *rep;
mfib_prefix_t pfx;
va_list ap;
+ int res;
va_start(ap, n_buckets);
@@ -253,12 +254,11 @@ mfib_test_entry (fib_node_index_t fei,
"%U links to %U",
format_mfib_prefix, &pfx,
format_dpo_id, &mfe->mfe_rep, 0);
- return (!0);
+ res = !0;
}
else
{
dpo_id_t tmp = DPO_INVALID;
- int res;
mfib_entry_contribute_forwarding(
fei,
@@ -274,9 +274,11 @@ mfib_test_entry (fib_node_index_t fei,
res = mfib_test_validate_rep_v(rep, n_buckets, ap);
dpo_reset(&tmp);
-
- return (res);
}
+
+ va_end(ap);
+
+ return (res);
}
static int