Remove computation of len from inside hash loop.
authorNick Clifton <nickc@redhat.com>
Fri, 17 May 2002 09:52:04 +0000 (09:52 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 17 May 2002 09:52:04 +0000 (09:52 +0000)
bfd/ChangeLog
bfd/hash.c

index 98281dd9b90a6dc87c453c6bc60a7ad2083efc90..9d1a0b05ea34a751c252f670ea0b94ef9fcec798 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-17  Stuart Balfour <sbalfour@cisco.com>
+
+       * hash.c (bfd_hash_lookup): Remove computation of len from inside
+       hash loop.
+
 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * config.bfd: Add targets for sh64-linux (little endian and
index 9766eaf0cf233cf57e434ca79fccd96d3651122e..a498cce46c9c89a6bb09a4e712b887fb9e7703d4 100644 (file)
@@ -375,8 +375,8 @@ bfd_hash_lookup (table, string, create, copy)
     {
       hash += c + (c << 17);
       hash ^= hash >> 2;
-      ++len;
     }
+  len = (s - (const unsigned char *) string) - 1;
   hash += len + (len << 17);
   hash ^= hash >> 2;
 
This page took 0.028128 seconds and 4 git commands to generate.