From: Brian Aker Date: Tue, 27 Dec 2011 04:53:35 +0000 (-0800) Subject: Clean up style in auto. X-Git-Tag: 1.0.3~3^2~1^2~16 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6c700392490e173ba109892760388ef345e66097;p=awesomized%2Flibmemcached Clean up style in auto. --- diff --git a/libmemcached/auto.cc b/libmemcached/auto.cc index 517e5b96..8879634f 100644 --- a/libmemcached/auto.cc +++ b/libmemcached/auto.cc @@ -108,10 +108,14 @@ static memcached_return_t binary_incr_decr(memcached_st *ptr, uint8_t cmd, if (no_reply) { if(cmd == PROTOCOL_BINARY_CMD_DECREMENT) + { cmd= PROTOCOL_BINARY_CMD_DECREMENTQ; + } if(cmd == PROTOCOL_BINARY_CMD_INCREMENT) + { cmd= PROTOCOL_BINARY_CMD_INCREMENTQ; + } } protocol_binary_request_incr request= {}; // = {.bytes= {0}}; @@ -254,12 +258,6 @@ memcached_return_t memcached_increment_with_initial(memcached_st *ptr, time_t expiration, uint64_t *value) { - uint64_t local_value; - if (value == NULL) - { - value= &local_value; - } - return memcached_increment_with_initial_by_key(ptr, key, key_length, key, key_length, offset, initial, expiration, value); @@ -318,12 +316,6 @@ memcached_return_t memcached_decrement_with_initial(memcached_st *ptr, time_t expiration, uint64_t *value) { - uint64_t local_value; - if (value == NULL) - { - value= &local_value; - } - return memcached_decrement_with_initial_by_key(ptr, key, key_length, key, key_length, offset, initial, expiration, value); @@ -346,17 +338,16 @@ memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr, } memcached_return_t rc; - if (memcached_failed(rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol))) + if (memcached_failed(rc= initialize_query(ptr))) { return rc; } - if (memcached_failed(rc= initialize_query(ptr))) + if (memcached_failed(rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol))) { return rc; } - LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START(); if (ptr->flags.binary_protocol) {