X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fexecute.c;h=0beaae4bd85229208b704568dac68f854ca435f2;hb=b539fd56a235cfbbdd12ebc64c66686b518573d0;hp=130fef0b67919e1c7290ddb0fafff7d7d464023a;hpb=521e830fe336a17bee6e7376e3bf01a3b35ddc37;p=awesomized%2Flibmemcached diff --git a/clients/execute.c b/clients/execute.c index 130fef0b..0beaae4b 100644 --- a/clients/execute.c +++ b/clients/execute.c @@ -14,8 +14,7 @@ Return the number of rows set. */ -#include "libmemcached/common.h" - +#include "config.h" #include "execute.h" unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of) @@ -77,9 +76,9 @@ unsigned int execute_get(memcached_st *memc, pairs_st *pairs, unsigned int numbe /** * Callback function to count the number of results */ -static memcached_return_t callback_counter(memcached_st *ptr, - memcached_result_st *result, - void *context) +static memcached_return_t callback_counter(const memcached_st *ptr, + memcached_result_st *result, + void *context) { (void)ptr; (void)result; @@ -108,12 +107,11 @@ unsigned int execute_mget(memcached_st *memc, rc= memcached_mget_execute(memc, keys, key_length, (size_t)number_of, callbacks, &retrieved, 1); - likely (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOTFOUND || + if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_BUFFERED || rc == MEMCACHED_END) { rc= memcached_fetch_execute(memc, callbacks, (void *)&retrieved, 1); - unlikely (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_NOTFOUND && - rc != MEMCACHED_END) + if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_NOTFOUND && rc != MEMCACHED_END) { fprintf(stderr, "Failed to execute mget: %s\n", memcached_strerror(memc, rc));