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
This commit is contained in:
smyczek 2009-07-20 18:44:00 +00:00 committed by Anand V. Avati
parent 1b89e8689c
commit ed80e78aec

View File

@ -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;