Patchwork libstdc++-v3/libsupc++/hash_bytes.cc clength bug

login
register
mail settings
Submitter DJ Delorie
Date Sept. 28, 2010, 9:13 p.m.
Message ID <201009282113.o8SLDThA028105@greed.delorie.com>
Download mbox | patch
Permalink /patch/66026/
State New
Headers show

Comments

DJ Delorie - Sept. 28, 2010, 9:13 p.m.
m32c-elf failed to build because clength was undefined.  Ok?
Paolo Carlini - Sept. 28, 2010, 10:29 p.m.
On 09/28/2010 11:13 PM, DJ Delorie wrote:
> m32c-elf failed to build because clength was undefined.  Ok?
>   
Yes, it's ok, thanks.

Paolo.
DJ Delorie - Sept. 29, 2010, 2 a.m.
Thanks, committed.

Patch

Index: libstdc++-v3/libsupc++/hash_bytes.cc
===================================================================
--- libstdc++-v3/libsupc++/hash_bytes.cc	(revision 164701)
+++ libstdc++-v3/libsupc++/hash_bytes.cc	(working copy)
@@ -169,13 +169,13 @@  namespace std
   // Dummy hash implementation for unusual sizeof(size_t).
   size_t
   _Hash_bytes(const void* ptr, size_t len, size_t seed)
   {
     size_t hash = seed;
     const char* cptr = reinterpret_cast<const char*>(ptr);
-    for (; clength; --clength)
+    for (; len; --len)
       hash = (hash * 131) + *cptr++;
     return hash;
   }
 
   size_t
   _Fnv_hash_bytes(const void* ptr, size_t len, size_t seed)