aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Valter <d-valter@yandex-team.com>2024-01-05 14:30:15 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-01-19 12:51:52 +0000
commit705f66e5acbc5c7ebc6e10f89a40c4ccdb787cac (patch)
tree63dd83bda901cf4c6e18ab95eab0547313f912ba
parent9f8d3b9b2fd3ec7c0b43ebd0d3b413e859073a1b (diff)
vppinfra: fix test_bihash
Correctly wrap data indices in test_bihash. Type: fix Signed-off-by: Dmitry Valter <d-valter@yandex-team.com> Change-Id: I740fa1cf9f8c382c12f01f607095c5995be6845f
-rw-r--r--src/vppinfra/test_bihash_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/test_bihash_template.c b/src/vppinfra/test_bihash_template.c
index af3ebb2ef0e..17cc05629ae 100644
--- a/src/vppinfra/test_bihash_template.c
+++ b/src/vppinfra/test_bihash_template.c
@@ -391,7 +391,7 @@ test_bihash (test_main_t * tm)
for (i = 0; i < tm->nitems; i++)
{
/* Prefetch buckets 8 iterations ahead */
- if (1 && (i < (tm->nitems - 8)))
+ if (1 && (i < ((i64) tm->nitems - 8)))
{
BVT (clib_bihash_kv) pref_kv;
u64 pref_hash;
@@ -475,7 +475,7 @@ test_bihash (test_main_t * tm)
for (j = 0; j < tm->nitems; j++)
{
/* Prefetch buckets 8 iterations ahead */
- if (1 && (j < (tm->nitems - 8)))
+ if (1 && (j < ((i64) tm->nitems - 8)))
{
BVT (clib_bihash_kv) pref_kv;
u64 pref_hash;