From: Brian Aker Date: Mon, 18 Jan 2010 19:42:24 +0000 (-0800) Subject: Small style cleanup. X-Git-Tag: 0.40~89 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b4aaefe9a54dd25f1288c714ac13aaef8fc4fcd6;p=m6w6%2Flibmemcached Small style cleanup. --- diff --git a/libmemcached/auto.c b/libmemcached/auto.c index 4fde5827..4d8cc0bd 100644 --- a/libmemcached/auto.c +++ b/libmemcached/auto.c @@ -11,7 +11,7 @@ #include "common.h" -static memcached_return_t memcached_auto(memcached_st *ptr, +static memcached_return_t text_incr_decr(memcached_st *ptr, const char *verb, const char *master_key, size_t master_key_length, const char *key, size_t key_length, @@ -160,7 +160,7 @@ memcached_return_t memcached_increment_by_key(memcached_st *ptr, } else { - rc= memcached_auto(ptr, "incr", master_key, master_key_length, key, key_length, offset, value); + rc= text_incr_decr(ptr, "incr", master_key, master_key_length, key, key_length, offset, value); } LIBMEMCACHED_MEMCACHED_INCREMENT_END(); @@ -180,12 +180,16 @@ memcached_return_t memcached_decrement_by_key(memcached_st *ptr, LIBMEMCACHED_MEMCACHED_DECREMENT_START(); if (ptr->flags.binary_protocol) + { rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_DECREMENT, master_key, master_key_length, key, key_length, (uint64_t)offset, 0, MEMCACHED_EXPIRATION_NOT_ADD, value); + } else - rc= memcached_auto(ptr, "decr", master_key, master_key_length, key, key_length, offset, value); + { + rc= text_incr_decr(ptr, "decr", master_key, master_key_length, key, key_length, offset, value); + } LIBMEMCACHED_MEMCACHED_DECREMENT_END();