core: hash_cstring: Prepare for M2-Planet.
* src/hash.c (hash_cstring): Prepare for M2-Planet.
This commit is contained in:
parent
5bae8803b2
commit
53e509ecf4
|
@ -27,7 +27,8 @@ int
|
|||
hash_cstring (char const *s, long size)
|
||||
{
|
||||
int hash = s[0] * 37;
|
||||
if (s[0] != 0 && s[1] != 0)
|
||||
if (s[0] != 0)
|
||||
if (s[1] != 0)
|
||||
hash = hash + s[1] * 43;
|
||||
assert_msg (size != 0, "size");
|
||||
hash = hash % size;
|
||||
|
|
Loading…
Reference in a new issue