X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=lib%2Fmemcached_hash.c;h=33c1055bbfd70ffd60aa1e902739367136b08705;hb=8d0cd77fc7bafd1f353bc7c50910b751766f931a;hp=961c794b58a686f6c1d28eb3a8f946d67c47842e;hpb=174e1d4d3011843e7e909c9b378b888c67d02538;p=m6w6%2Flibmemcached diff --git a/lib/memcached_hash.c b/lib/memcached_hash.c index 961c794b..33c1055b 100644 --- a/lib/memcached_hash.c +++ b/lib/memcached_hash.c @@ -1,10 +1,10 @@ #include "common.h" /* Defines */ -static uint64_t FNV_64_INIT= 0xcbf29ce484222325L; -static uint64_t FNV_64_PRIME= 0x100000001b3L; +static uint64_t FNV_64_INIT= 0xcbf29ce484222325LL; +static uint64_t FNV_64_PRIME= 0x100000001b3LL; -static uint32_t FNV_32_INIT= 2166136261L; +static uint32_t FNV_32_INIT= 2166136261UL; static uint32_t FNV_32_PRIME= 16777619; /* Prototypes */ @@ -17,6 +17,8 @@ unsigned int memcached_generate_hash(memcached_st *ptr, char *key, size_t key_le uint64_t hash= 1; /* Just here to remove compile warning */ unsigned int x; + WATCHPOINT_ASSERT(ptr->number_of_hosts); + switch (ptr->hash) { case MEMCACHED_HASH_DEFAULT: