Merge pull request #198 from nicolasnoble/murmur

Fixing a suspicious-looking paradigm in murmur_hash.c
pull/212/head
Craig Tiller 10 years ago
commit ab4c17d3c1
  1. 6
      src/core/support/murmur_hash.c

@ -52,7 +52,7 @@ gpr_uint32 gpr_murmur_hash3(const void *key, size_t len, gpr_uint32 seed) {
int i;
gpr_uint32 h1 = seed;
gpr_uint32 k1 = 0;
gpr_uint32 k1;
const gpr_uint32 c1 = 0xcc9e2d51;
const gpr_uint32 c2 = 0x1b873593;
@ -62,7 +62,7 @@ gpr_uint32 gpr_murmur_hash3(const void *key, size_t len, gpr_uint32 seed) {
/* body */
for (i = -nblocks; i; i++) {
gpr_uint32 k1 = GETBLOCK32(blocks, i);
k1 = GETBLOCK32(blocks, i);
k1 *= c1;
k1 = ROTL32(k1, 15);
@ -73,6 +73,8 @@ gpr_uint32 gpr_murmur_hash3(const void *key, size_t len, gpr_uint32 seed) {
h1 = h1 * 5 + 0xe6546b64;
}
k1 = 0;
/* tail */
switch (len & 3) {
case 3:

Loading…
Cancel
Save