summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src.c
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-08-23 17:29:00 +0000
committerNeale Ranns <neale@graphiant.com>2022-08-29 23:52:39 +0000
commitd2acfbc8f8beaaa544d70163da1622a72a863084 (patch)
treee94c108fcf57d35009978f22c6065a016a379c39 /src/vnet/fib/fib_entry_src.c
parent165c963ec5f2d80ab1871e63e0bdd602a9c430e3 (diff)
fib: fix coverity 249175
Add an assert to express the constraint to coverity without incurring the overhead in release builds. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I2c22f8b2565c645d95c9c0be37381060e151420f
Diffstat (limited to 'src/vnet/fib/fib_entry_src.c')
-rw-r--r--src/vnet/fib/fib_entry_src.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c
index c0275e898bd..39e719e6a7a 100644
--- a/src/vnet/fib/fib_entry_src.c
+++ b/src/vnet/fib/fib_entry_src.c
@@ -46,6 +46,7 @@ fib_entry_src_get_vft (const fib_entry_src_t *esrc)
return (&fib_entry_src_bh_vft[FIB_SOURCE_BH_INTERPOSE]);
}
+ ASSERT(bh < FIB_SOURCE_BH_MAX);
return (&fib_entry_src_bh_vft[bh]);
}