Module: kamailio Branch: master Commit: b5f2aabbc692dedff4788e4470ea534d90c7cab4 URL: https://github.com/kamailio/kamailio/commit/b5f2aabbc692dedff4788e4470ea534d...
Author: Henning Westerholt hw@kamailio.org Committer: Henning Westerholt hw@kamailio.org Date: 2018-10-07T09:48:05+02:00
core: remove a code block related to hash functions, deactivated with #ifdef since 2002
---
Modified: src/core/hash_func.c
---
Diff: https://github.com/kamailio/kamailio/commit/b5f2aabbc692dedff4788e4470ea534d... Patch: https://github.com/kamailio/kamailio/commit/b5f2aabbc692dedff4788e4470ea534d...
---
diff --git a/src/core/hash_func.c b/src/core/hash_func.c index 939361a4aa..71d12f0d25 100644 --- a/src/core/hash_func.c +++ b/src/core/hash_func.c @@ -79,18 +79,6 @@ unsigned int new_hash( str call_id, str cseq_nr ) hash_code+=ccitt_tab[(unsigned char)*(cs+i)+123];
/* hash_code conditioning */ -#ifdef _BUG - /* not flat ... % 111b has shorter period than - & 111b by one and results in different distribution; - ( 7 % 7 == 0, 7 %7 == 1 ) - % is used as a part of the hash function too, not only - for rounding; & is not flat; whoever comes up with - a nicer flat hash function which does not take - costly division is welcome; feel free to verify - distribution using hashtest() - */ - hash_code &= (TABLE_ENTRIES-1); /* TABLE_ENTRIES = 2^k */ -#endif hash_code=hash_code%(TABLE_ENTRIES-1)+1; return hash_code; }