summaryrefslogtreecommitdiff
path: root/misc/hsearch_r.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-04-24 19:14:55 +0000
committerJakub Jelinek <jakub@redhat.com>2009-04-24 19:14:55 +0000
commit8feaf01b210752a478e2e59a274ef244c8af2c0b (patch)
tree1ed5e46ca5e574d6de90c4b099f9866d22fc424e /misc/hsearch_r.c
parent7dec33c08e4755e72d1280e48e61f0141dfc1da5 (diff)
Updated to fedora-glibc-20090424T1908cvs/fedora-glibc-2_9_90-21
Diffstat (limited to 'misc/hsearch_r.c')
-rw-r--r--misc/hsearch_r.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
index 6e32afc43e..73b9565030 100644
--- a/misc/hsearch_r.c
+++ b/misc/hsearch_r.c
@@ -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;