summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 2ea16fec..3d3b90f8 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -1,5 +1,6 @@
/* $Id$ */
#include "bbs.h"
+#include "fnv_hash.h"
/* ----------------------------------------------------- */
/* set file path for boards/user home */
@@ -895,12 +896,7 @@ void FREE(void *ptr)
unsigned
StringHash(unsigned char *s)
{
- unsigned int v = 0;
- while (*s) {
- v = (v << 8) | (v >> 24);
- v ^= toupper(*s++); /* note this is case insensitive */
- }
- return (v * 2654435769U) >> (32 - HASH_BITS);
+ return fnv1a_32_strcase(s, FNV1_32_INIT);
}
inline int *intbsearch(int key, int *base0, int nmemb)