1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00
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:
Ulrich Drepper
2009-04-24 18:20:10 +00:00
parent f397be127c
commit c2d5bd5b00
3 changed files with 20 additions and 15 deletions

View File

@@ -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;