aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 9481747..b20074b 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -96,8 +96,10 @@ msymbol_hash_iw (const char *string)
while (isspace (*string))
++string;
if (*string && *string != '(')
- hash = (31 * hash) + *string;
- ++string;
+ {
+ hash = hash * 67 + *string - 113;
+ ++string;
+ }
}
return hash % MINIMAL_SYMBOL_HASH_SIZE;
}
@@ -109,7 +111,7 @@ msymbol_hash (const char *string)
{
unsigned int hash = 0;
for (; *string; ++string)
- hash = (31 * hash) + *string;
+ hash = hash * 67 + *string - 113;
return hash % MINIMAL_SYMBOL_HASH_SIZE;
}