diff --git a/libidu/idu-hash.c b/libidu/idu-hash.c index ec82a2b..b97400b 100644 --- a/libidu/idu-hash.c +++ b/libidu/idu-hash.c @@ -89,7 +89,7 @@ hash_find_slot (struct hash_table* ht, void const *key) ht->ht_lookups++; for (;;) { - hash_1 %= ht->ht_size; + hash_1 &= (ht->ht_size - 1); slot = &ht->ht_vec[hash_1]; if (*slot == 0)