projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Disable murmur test on sparc hardware (platform specific hash algorith)
[m6w6/libmemcached]
/
libmemcached
/
crc.c
diff --git
a/libmemcached/crc.c
b/libmemcached/crc.c
index 5c586bf0ab8663cea7ce90a79a2a11abb4d5be96..90d3041c3fa3d7d606efb54b285929c8adaed5e8 100644
(file)
--- a/
libmemcached/crc.c
+++ b/
libmemcached/crc.c
@@
-76,11
+76,11
@@
static const uint32_t crc32tab[256] = {
uint32_t hash_crc32(const char *key, size_t key_length)
{
uint32_t hash_crc32(const char *key, size_t key_length)
{
- uint
32
_t x;
+ uint
64
_t x;
uint32_t crc= UINT32_MAX;
for (x= 0; x < key_length; x++)
uint32_t crc= UINT32_MAX;
for (x= 0; x < key_length; x++)
-
crc= (crc >> 8) ^ crc32tab[(crc ^ (key[x])
) & 0xff];
+
crc= (crc >> 8) ^ crc32tab[(crc ^ (uint64_t)key[x]
) & 0xff];
return ~crc;
}
return ~crc;
}