summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/hashfn.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-06-09 13:31:31 +0300
committerAmar Tumballi <amarts@redhat.com>2019-06-14 16:50:32 +0000
commit0a6fe8551ac9807a8b6ad62241ec8048cf9f9025 (patch)
tree7f6d6b7920ed775c75ca7b4a3dd14aceef5eec38 /libglusterfs/src/hashfn.c
parent65e3624091e895ca32cd91468552589f34d17595 (diff)
multiple files: another attempt to remove includes
There are many include statements that are not needed. A previous more ambitious attempt failed because of *BSD plafrom (see https://review.gluster.org/#/c/glusterfs/+/21929/ ) Now trying a more conservative reduction. It does not solve all circular deps that we have, but it does reduce some of them. There is just too much to handle reasonably (dht-common.h includes dht-lock.h which includes dht-common.h ...), but it does reduce the overall number of lines of include we need to look at in the future to understand and fix the mess later one. Change-Id: I550cd001bdefb8be0fe67632f783c0ef6bee3f9f updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs/src/hashfn.c')
-rw-r--r--libglusterfs/src/hashfn.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/libglusterfs/src/hashfn.c b/libglusterfs/src/hashfn.c
index 5f6988417ea..d2237e99f83 100644
--- a/libglusterfs/src/hashfn.c
+++ b/libglusterfs/src/hashfn.c
@@ -11,24 +11,12 @@
#include <stdint.h>
#include <stdlib.h>
-#include "glusterfs/hashfn.h"
-
#define get16bits(d) (*((const uint16_t *)(d)))
#define DM_DELTA 0x9E3779B9
#define DM_FULLROUNDS 10 /* 32 is overkill, 16 is strong crypto */
#define DM_PARTROUNDS 6 /* 6 gets complete mixing */
-uint32_t
-ReallySimpleHash(char *path, int len)
-{
- uint32_t hash = 0;
- for (; len > 0; len--)
- hash ^= (char)path[len];
-
- return hash;
-}
-
/*
This is apparently the "fastest hash function for strings".
Written by Paul Hsieh <http://www.azillionmonkeys.com/qed/hash.html>