diff options
author | smyczek <smyczek@simplito.com> | 2009-07-20 18:44:00 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-27 11:33:42 -0700 |
commit | ed80e78aecf5f46e29e5cb9034f2b2c06836b8d4 (patch) | |
tree | 622b95cdf081106478c64128ffca0df96bdb4aa9 /libglusterfs/src/hashfn.c | |
parent | 1b89e8689c070ceeeafa24e03c8aed6e17540aef (diff) |
libglusterfs: fix SuperFastHash function used in dicitionaries in fact it always returned the value of second parameter (len) as a result.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 155 (The SuperFastHash function used in dictionaries is broken.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=155
Diffstat (limited to 'libglusterfs/src/hashfn.c')
-rw-r--r-- | libglusterfs/src/hashfn.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libglusterfs/src/hashfn.c b/libglusterfs/src/hashfn.c index d53ecb56a..cf0e72a9f 100644 --- a/libglusterfs/src/hashfn.c +++ b/libglusterfs/src/hashfn.c @@ -57,13 +57,6 @@ uint32_t SuperFastHash (const char * data, int32_t len) { if (len <= 1 || data == NULL) return 1; - - for (;len > 0; len--) { - hash ^= data[len]; - - return hash; - } - rem = len & 3; len >>= 2; |