Module Name: src
Committed By: rmind
Date: Sun Jul 8 13:42:29 UTC 2012
Modified Files:
src/common/lib/libc/hash/murmurhash: murmurhash.c
Log Message:
Shut up lint.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/hash/murmurhash/murmurhash.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libc/hash/murmurhash/murmurhash.c
diff -u src/common/lib/libc/hash/murmurhash/murmurhash.c:1.1 src/common/lib/libc/hash/murmurhash/murmurhash.c:1.2
--- src/common/lib/libc/hash/murmurhash/murmurhash.c:1.1 Sun Jul 8 01:21:12 2012
+++ src/common/lib/libc/hash/murmurhash/murmurhash.c Sun Jul 8 13:42:29 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: murmurhash.c,v 1.1 2012/07/08 01:21:12 rmind Exp $ */
+/* $NetBSD: murmurhash.c,v 1.2 2012/07/08 13:42:29 rmind Exp $ */
/*
* MurmurHash2 -- from the original code:
@@ -16,9 +16,9 @@
#include <sys/hash.h>
#if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, "$NetBSD: murmurhash.c,v 1.1 2012/07/08 01:21:12 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: murmurhash.c,v 1.2 2012/07/08 13:42:29 rmind Exp $");
#else
-__RCSID("$NetBSD: murmurhash.c,v 1.1 2012/07/08 01:21:12 rmind Exp $");
+__RCSID("$NetBSD: murmurhash.c,v 1.2 2012/07/08 13:42:29 rmind Exp $");
#endif
uint32_t
@@ -33,7 +33,7 @@ murmurhash2(const void *key, size_t len,
const int r = 24;
const uint8_t *data = (const uint8_t *)key;
- uint32_t h = seed ^ len;
+ uint32_t h = seed ^ (uint32_t)len;
while (len >= sizeof(uint32_t)) {
uint32_t k;
@@ -58,8 +58,10 @@ murmurhash2(const void *key, size_t len,
switch (len) {
case 3:
h ^= data[2] << 16;
+ /* FALLTHROUGH */
case 2:
h ^= data[1] << 8;
+ /* FALLTHROUGH */
case 1:
h ^= data[0];
h *= m;