projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge Patrick's exception branch.
[m6w6/libmemcached]
/
libmemcached
/
murmur_hash.c
diff --git
a/libmemcached/murmur_hash.c
b/libmemcached/murmur_hash.c
index edb9e7772afe8191801185aff9f8ae393b3440da..b95134408d287270b17508af10f2325f9d6035c4 100644
(file)
--- a/
libmemcached/murmur_hash.c
+++ b/
libmemcached/murmur_hash.c
@@
-25,13
+25,13
@@
uint32_t murmur_hash(const char *key, size_t length)
*/
const unsigned int m= 0x5bd1e995;
*/
const unsigned int m= 0x5bd1e995;
- const
unsigned in
t seed= (0xdeadbeef * length);
+ const
size_
t seed= (0xdeadbeef * length);
const int r= 24;
// Initialize the hash to a 'random' value
const int r= 24;
// Initialize the hash to a 'random' value
-
unsigned in
t h= seed ^ length;
+
size_
t h= seed ^ length;
// Mix 4 bytes at a time into the hash
// Mix 4 bytes at a time into the hash
@@
-72,5
+72,5
@@
uint32_t murmur_hash(const char *key, size_t length)
h *= m;
h ^= h >> 15;
h *= m;
h ^= h >> 15;
- return h;
+ return
(uint32_t)
h;
}
}