aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-09 05:21:51 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-09 05:21:51 +0000
commit0f78390bd799fc0b0394240a9a704591481ac8c6 (patch)
treeebcee12924e287ad5811b0a5e2387645dfb44361 /locale
parent8f739934b026cd0c298e3196d38d483eb1f88bed (diff)
downloadglibc-0f78390bd799fc0b0394240a9a704591481ac8c6.zip
glibc-0f78390bd799fc0b0394240a9a704591481ac8c6.tar.gz
glibc-0f78390bd799fc0b0394240a9a704591481ac8c6.tar.bz2
Update.
* locale/elem-hash.h (elem_hash): Correct stupid mistake and create real hash values now. Patch by Isamu Hasegawa <isamu@yamato.ibm.com>. * libio/iofgetpos.c (_IO_new_fgetpos): Correct a few problems in the handling of wide streams.
Diffstat (limited to 'locale')
-rw-r--r--locale/elem-hash.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/locale/elem-hash.h b/locale/elem-hash.h
index f68e764..9efe8d1 100644
--- a/locale/elem-hash.h
+++ b/locale/elem-hash.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -24,10 +24,10 @@ elem_hash (const char *str, int_fast32_t n)
{
int32_t result = n;
- while (n > 0)
+ while (n-- > 0)
{
- n <<= 3;
- n += *str++;
+ result <<= 3;
+ result += *str++;
}
return result;