From 70bb1aa163ad2e4aa8a85369bf08515ad5044458 Mon Sep 17 00:00:00 2001 From: David Edelsohn <dje.gcc@gmail.com> Date: Mon, 7 Apr 1997 19:27:12 +0000 Subject: * cgen-opc.c (hash_keyword_name): Improve algorithm. --- opcodes/cgen-opc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opcodes/cgen-opc.c') 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; } -- cgit v1.1