summaryrefslogtreecommitdiffstats
path: root/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'vppinfra')
-rw-r--r--vppinfra/vppinfra/hash.c4
-rw-r--r--vppinfra/vppinfra/sparse_vec.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/vppinfra/vppinfra/hash.c b/vppinfra/vppinfra/hash.c
index c4d724935a5..cbb922edd5a 100644
--- a/vppinfra/vppinfra/hash.c
+++ b/vppinfra/vppinfra/hash.c
@@ -391,8 +391,8 @@ set_indirect (void * v, hash_pair_indirect_t * pi, uword key,
if (new_len * hash_pair_bytes (h) > (1ULL << log2_bytes))
{
pi->pairs = clib_mem_realloc (pi->pairs,
- 1 << (log2_bytes + 1),
- 1 << log2_bytes);
+ 1ULL << (log2_bytes + 1),
+ 1ULL << log2_bytes);
log2_bytes++;
}
diff --git a/vppinfra/vppinfra/sparse_vec.h b/vppinfra/vppinfra/sparse_vec.h
index 08e97f352a9..bf18ebd9e9b 100644
--- a/vppinfra/vppinfra/sparse_vec.h
+++ b/vppinfra/vppinfra/sparse_vec.h
@@ -87,7 +87,7 @@ sparse_vec_new (uword elt_bytes, uword sparse_index_bits)
n = sparse_index_bits - min_log2 (BITS (uword));
if (n < 0)
n = 0;
- n = 1 << n;
+ n = 1ULL << n;
vec_resize (h->is_member_bitmap, n);
vec_resize (h->member_counts, n);