From a2e31d6846321c15a127f5cc9e372e9f1dc02759 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Tue, 30 Jun 2015 19:16:49 +0300 Subject: [PATCH] Changed the service resource hashing function into a proper string hashing function. --- server/core/dbusers.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/server/core/dbusers.c b/server/core/dbusers.c index 935644c18..6748a1437 100644 --- a/server/core/dbusers.c +++ b/server/core/dbusers.c @@ -1842,18 +1842,6 @@ char *mysql_format_user_entry(void *data) return mysql_user; } -/* - * The hash function we use for storing MySQL database names. - * - * @param key The key value - * @return The hash key - */ -int -resource_hash(char *key) -{ - return (*key + *(key + 1)); -} - /** * Remove the resources table * @@ -1877,7 +1865,7 @@ resource_alloc() { HASHTABLE *resources; - if ((resources = hashtable_alloc(10, resource_hash, strcmp)) == NULL) + if ((resources = hashtable_alloc(10, simple_str_hash, strcmp)) == NULL) { return NULL; }