diff options
author | Dave Barach <dave@barachs.net> | 2016-08-10 16:56:16 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2016-08-10 16:56:32 -0400 |
commit | dd522cbaf421de7b34887fb8c33981c4ebca9201 (patch) | |
tree | 79dab4a6a205d683b77e21f92514923c952195e0 /vppinfra | |
parent | 839fe3e6d65dbbd7cd102a22a7259d2556b7410a (diff) |
VPP-189 Fix coverity warnings
Change-Id: Iea6d338e60a95f7f30c10c2e751d4827e816f700
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vppinfra')
-rw-r--r-- | vppinfra/vppinfra/hash.c | 4 | ||||
-rw-r--r-- | vppinfra/vppinfra/sparse_vec.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vppinfra/vppinfra/hash.c b/vppinfra/vppinfra/hash.c index c4d72493..cbb922ed 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 08e97f35..bf18ebd9 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); |