summaryrefslogtreecommitdiff
path: root/bfd/hash.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-17 09:52:04 +0000
committerNick Clifton <nickc@redhat.com>2002-05-17 09:52:04 +0000
commit2c13d98be13219212a2038968b616b5c542a46cb (patch)
tree21345dd4214d694a024cd0e1757ea17f828640fb /bfd/hash.c
parentab3b81262e3164b572fc8eada737809cc09c92f8 (diff)
Remove computation of len from inside hash loop.
Diffstat (limited to 'bfd/hash.c')
-rw-r--r--bfd/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/hash.c b/bfd/hash.c
index 9766eaf0cf..a498cce46c 100644
--- a/bfd/hash.c
+++ b/bfd/hash.c
@@ -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;