diff --git a/include/asm/util.h b/include/asm/util.h index 30f96102..c9437222 100644 --- a/include/asm/util.h +++ b/include/asm/util.h @@ -11,8 +11,8 @@ #include -uint32_t calchash(const char *s); char const *printChar(int c); + /* * @return The number of bytes read, or 0 if invalid data was found */ diff --git a/src/asm/util.c b/src/asm/util.c index be961a60..e368121d 100644 --- a/src/asm/util.c +++ b/src/asm/util.c @@ -15,21 +15,6 @@ #include "extern/utf8decoder.h" -/* - * Calculate the hash value for a string. - * Uses the djb2 algorithm (xor version). - * http://www.cse.yorku.ca/~oz/hash.html - */ -uint32_t calchash(const char *s) -{ - uint32_t hash = 5381; - - while (*s != 0) - hash = (hash * 33) ^ (*s++); - - return hash; -} - char const *printChar(int c) { // "'A'" + '\0': 4 bytes