aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-08-23 17:23:47 +0000
committerNeale Ranns <neale@graphiant.com>2022-08-29 23:52:13 +0000
commit165c963ec5f2d80ab1871e63e0bdd602a9c430e3 (patch)
treed07d6c244e509c49a817132ccbe635766c9065b3 /src/vnet
parentb46a4e69e5db18ef792415439d04a0ab22c59386 (diff)
fib: fix coverity 253539
Add an ASSERT so coverity is aware of the assumption taken, without incurring any penalty in release build. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I3e7e1e77059492315409efbed47657f9e56d167c Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/dpo/load_balance.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vnet/dpo/load_balance.c b/src/vnet/dpo/load_balance.c
index 9001a351ccb..ff46d56e3e2 100644
--- a/src/vnet/dpo/load_balance.c
+++ b/src/vnet/dpo/load_balance.c
@@ -592,6 +592,7 @@ load_balance_fill_buckets_sticky (load_balance_t *lb,
{
/* fill the bucks from the next up path */
load_balance_set_bucket_i(lb, bucket++, buckets, &fwding_paths[fpath].path_dpo);
+ ASSERT(vec_len(fwding_paths) > 0);
fpath = (fpath + 1) % vec_len(fwding_paths);
}
}