summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2020-09-01 09:35:31 +0200
committerDave Barach <openvpp@barachs.net>2020-09-01 11:19:34 +0000
commit7be474635dad869975b3a5dbcaaf17d14f2fb104 (patch)
tree50b2c78f8194c78fa2110d5375807309cdcdd19d /src
parent369e4e56e228f5ec5c4eb487620d713ac25ce015 (diff)
vppinfra: Fix bihash coverity warning
Type: fix Hitting a code not reachable when setting BIHASH_KVP_AT_BUCKET_LEVEL = 1 Change-Id: I24d539df67ae7650a3b1969f5709a6f7366d786b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/bihash_template.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/bihash_template.h b/src/vppinfra/bihash_template.h
index 85c5d6505c0..d6aa3c9f6ef 100644
--- a/src/vppinfra/bihash_template.h
+++ b/src/vppinfra/bihash_template.h
@@ -368,9 +368,9 @@ BV (clib_bihash_get_bucket) (BVT (clib_bihash) * h, u64 hash)
offset = offset * (sizeof (BVT (clib_bihash_bucket))
+ (BIHASH_KVP_PER_PAGE * sizeof (BVT (clib_bihash_kv))));
return ((BVT (clib_bihash_bucket) *) (((u8 *) h->buckets) + offset));
-#endif
-
+#else
return h->buckets + (hash & (h->nbuckets - 1));
+#endif
}
static inline int BV (clib_bihash_search_inline_with_hash)