]> sourceware.org Git - glibc.git/commitdiff
Make locale archive hash function architecture-independent.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 23 Sep 2013 23:03:34 +0000 (23:03 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 23 Sep 2013 23:03:34 +0000 (23:03 +0000)
ChangeLog
locale/hashval.h

index a83e5f66fb7ea891114d08f923f70eed3e791301..2963c38af6d317cf94dd4e869974fac7cdf722de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-23  Joseph Myers  <joseph@codesourcery.com>
+
+       * locale/hashval.h (compute_hashval): Interpret bytes of key as
+       unsigned char.
+
 2013-09-23  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * manual/threads.texi (POSIX Threads): Fix a typo.
index 737162f6b86ed60838d7238f37141f8b54a63666..88e7839386c8af5ef409a806faea39fe6536dc2e 100644 (file)
@@ -37,7 +37,7 @@ compute_hashval (const void *key, size_t keylen)
   while (cnt < keylen)
     {
       hval = (hval << 9) | (hval >> (sizeof hval * CHAR_BIT - 9));
-      hval += (hashval_t) *(((char *) key) + cnt++);
+      hval += (hashval_t) ((const unsigned char *) key)[cnt++];
     }
   return hval != 0 ? hval : ~((hashval_t) 0);
 }
This page took 0.110592 seconds and 5 git commands to generate.