Skip to content

Commit

Permalink
Merge pull request #1603 from paultag/paultag/bugfix/implicit-fallthr…
Browse files Browse the repository at this point in the history
…ough

Add explicit breaks to avoid implicit passthrough.
  • Loading branch information
unbit committed Aug 7, 2017
2 parents 1fcac10 + 0a14d0f commit c6a33f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/hash.c
Expand Up @@ -42,11 +42,14 @@ static uint32_t murmur2_hash(char *key, uint64_t keylen) {
switch (keylen) {
case 3:
h ^= key[2] << 16;
break;
case 2:
h ^= key[1] << 8;
break;
case 1:
h ^= key[0];
h *= 0x5bd1e995;
break;
}

h ^= h >> 13;
Expand Down

0 comments on commit c6a33f2

Please sign in to comment.