3089f1f2fd
The hash table implementation uses `& (h->size - 1)` to truncate generated hashes to the number of buckets. This operation is equal to `% h->size` if and only if the size is a power of two (which seems to be always the case). One property of the binary and with a power of two (and probably a small one <=2048) is all higher bits are discarded. Thus a hash function is needed with a good avalanche effect, which the current one is not. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com> |
||
---|---|---|
.. | ||
Makefile | ||
hashtab.c | ||
hashtab.h | ||
newrole-lspp.pamd | ||
newrole.1 | ||
newrole.c | ||
newrole.pamd |