projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Null
[m6w6/libmemcached]
/
lib
/
memcached_hash.c
diff --git
a/lib/memcached_hash.c
b/lib/memcached_hash.c
index 74cd636059cc267cee8cb8c1e1b9793916a6b00a..a8ecebf5c419cb912778e899a08c9cc6687ef246 100644
(file)
--- a/
lib/memcached_hash.c
+++ b/
lib/memcached_hash.c
@@
-1,12
+1,11
@@
-#include
<memcached.h>
+#include
"common.h"
unsigned int memcached_generate_hash(char *key, size_t key_length)
{
unsigned int memcached_generate_hash(char *key, size_t key_length)
{
- unsigned int x = key_length;
- char *ptr = key;
- unsigned int value = 0;
+ char *ptr= key;
+ unsigned int value= 0;
- while (
x--
)
+ while (
--key_length
)
{
value += *ptr++;
value += (value << 10);
{
value += *ptr++;
value += (value << 10);