projects
/
awesomized
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
b1d5d8b
)
Fix for when CRC return 0.
author
Brian Aker
<brian@tangent.org>
Mon, 17 Dec 2007 22:09:40 +0000
(14:09 -0800)
committer
Brian Aker
<brian@tangent.org>
Mon, 17 Dec 2007 22:09:40 +0000
(14:09 -0800)
lib/memcached_hash.c
patch
|
blob
|
history
diff --git
a/lib/memcached_hash.c
b/lib/memcached_hash.c
index 87c59d510ae55cbc32cff6def7d1817acd8104b6..9906f5d9be30f5dcd6dde919f36497bbd58b59b3 100644
(file)
--- a/
lib/memcached_hash.c
+++ b/
lib/memcached_hash.c
@@
-29,6
+29,8
@@
unsigned int memcached_generate_hash(memcached_st *ptr, char *key, size_t key_le
break;
case MEMCACHED_HASH_CRC:
hash= ((hash_crc32(key, key_length) >> 16) & 0x7fff);
+ if (hash == 0)
+ hash= 1;
break;
/* FNV hash'es lifted from Dustin Sallings work */
case MEMCACHED_HASH_FNV1_64: