From 705f66e5acbc5c7ebc6e10f89a40c4ccdb787cac Mon Sep 17 00:00:00 2001 From: Dmitry Valter Date: Fri, 5 Jan 2024 14:30:15 +0000 Subject: vppinfra: fix test_bihash Correctly wrap data indices in test_bihash. Type: fix Signed-off-by: Dmitry Valter Change-Id: I740fa1cf9f8c382c12f01f607095c5995be6845f --- src/vppinfra/test_bihash_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vppinfra') 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; -- cgit 1.2.3-korg