summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2012-02-22 16:19:38 -0600
committerDan McGee <dpmcgee@gmail.com>2012-02-22 16:19:38 -0600
commitf5192e1929a344c3b9b90b71326581ef27875256 (patch)
tree167963960c40268f85164dc2b2b6a0db7c11e788
parent1b685b15bba25cdc5f79687f964b9bafc741fe41 (diff)
downloadonkyocontrol-f5192e1929a344c3b9b90b71326581ef27875256.tar.gz
onkyocontrol-f5192e1929a344c3b9b90b71326581ef27875256.zip
Simplify hash function
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index df6fee3..9a7dcdb 100644
--- a/util.c
+++ b/util.c
@@ -82,7 +82,7 @@ unsigned long hash_sdbm(const char *str)
if(!str)
return hash;
while((c = *str++))
- hash = c + (hash << 6) + (hash << 16) - hash;
+ hash = c + hash * 65599;
return hash;
}