silence coverity#1202740 Bad bit shift operation

Change-Id: I88c38a1a7eae0d1e2011c40983490efef1ff6438
This commit is contained in:
Caolán McNamara
2017-02-20 08:56:17 +00:00
parent 3d10c608b0
commit 234bc82308

View File

@@ -130,7 +130,9 @@ rtl_cache_hash_rescale (
cache->m_hash_table = new_table;
cache->m_hash_size = new_size;
cache->m_hash_shift = highbit(cache->m_hash_size) - 1;
const auto bit = highbit(cache->m_hash_size);
assert(bit > 0);
cache->m_hash_shift = bit - 1;
for (i = 0; i < old_size; i++)
{