diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1997-04-07 19:27:12 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1997-04-07 19:27:12 +0000 |
commit | 70bb1aa163ad2e4aa8a85369bf08515ad5044458 (patch) | |
tree | 3eb58d8612b0765d231e5d65e33e430840df6430 /opcodes/cgen-opc.c | |
parent | 61e51cd730ef4eb9bc265569a89ef349ee326fd4 (diff) | |
download | gdb-70bb1aa163ad2e4aa8a85369bf08515ad5044458.zip gdb-70bb1aa163ad2e4aa8a85369bf08515ad5044458.tar.gz gdb-70bb1aa163ad2e4aa8a85369bf08515ad5044458.tar.bz2 |
* cgen-opc.c (hash_keyword_name): Improve algorithm.
Diffstat (limited to 'opcodes/cgen-opc.c')
-rw-r--r-- | opcodes/cgen-opc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c index cbe9d5c..cb622c4 100644 --- a/opcodes/cgen-opc.c +++ b/opcodes/cgen-opc.c @@ -236,7 +236,7 @@ hash_keyword_name (kt, name) unsigned int hash; for (hash = 0; *name; ++name) - hash += *name; + hash = (hash * 97) + (unsigned char) *name; return hash % kt->hash_table_size; } |