aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_utils.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-09-01 08:50:55 +0200
committerLuca Deri <deri@ntop.org>2023-09-01 08:50:55 +0200
commit74fdac7d77a933f6b8ef894d1f2fbd3c9052fdcb (patch)
tree2bd5845aafa769879875b350d99690ab0fb94a73 /src/lib/ndpi_utils.c
parent133f45f3f3c9f8895d87f15b4072dd5dd5c83437 (diff)
Code cleanup
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r--src/lib/ndpi_utils.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index c62d82edf..b58fce522 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -3007,25 +3007,3 @@ u_int32_t ndpi_nearest_power_of_two(u_int32_t x) {
return(x);
}
-/* ********************************************************** */
-
-/*
- https://en.wikipedia.org/wiki/Jenkins_hash_function
-
- See also http://burtleburtle.net/bob/hash/spooky.html
-*/
-u_int32_t ndpi_hash_string(char *str) {
- u_int32_t hash, i;
-
- for(hash = i = 0; str[i] != '\0'; ++i) {
- hash += str[i];
- hash += (hash << 10);
- hash ^= (hash >> 6);
- }
-
- hash += (hash << 3);
- hash ^= (hash >> 11);
- hash += (hash << 15);
-
- return(hash);
-}