mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
[BZ #10100]
2009-04-24 Ulrich Drepper <drepper@redhat.com> [BZ #10100] * misc/hsearch_r.c (hsearch_r): Add back ensurance that hval is not zero.
This commit is contained in:
@@ -157,6 +157,8 @@ hsearch_r (item, action, retval, htab)
|
||||
hval <<= 4;
|
||||
hval += item.key[count];
|
||||
}
|
||||
if (hval == 0)
|
||||
++hval;
|
||||
|
||||
/* First hash function: simply take the modul but prevent zero. */
|
||||
idx = hval % htab->size + 1;
|
||||
|
||||
Reference in New Issue
Block a user