{
bool no_reply= ptr->flags.no_reply;
- if (memcached_server_count(ptr) == 0)
- return memcached_set_error(*ptr, MEMCACHED_NO_SERVERS, MEMCACHED_AT);
-
uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
memcached_server_write_instance_st instance= memcached_server_instance_fetch(ptr, server_key);
{
memcached_return_t rc;
uint64_t local_value;
- if (not value)
+ if (value == NULL)
+ {
value= &local_value;
+ }
if (memcached_failed(rc= initialize_query(ptr)))
{
uint64_t *value)
{
uint64_t local_value;
- if (not value)
+ if (value == NULL)
+ {
value= &local_value;
+ }
memcached_return_t rc;
if (memcached_failed(rc= initialize_query(ptr)))
uint64_t *value)
{
uint64_t local_value;
- if (! value)
+ if (value == NULL)
+ {
value= &local_value;
+ }
return memcached_increment_with_initial_by_key(ptr, key, key_length,
key, key_length,
uint64_t *value)
{
uint64_t local_value;
- if (not value)
+ if (value == NULL)
+ {
value= &local_value;
+ }
memcached_return_t rc;
if (memcached_failed(rc= initialize_query(ptr)))
LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START();
if (ptr->flags.binary_protocol)
+ {
rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_INCREMENT,
group_key, group_key_length, key, key_length,
offset, initial, (uint32_t)expiration,
value);
+ }
else
+ {
rc= MEMCACHED_PROTOCOL_ERROR;
+ }
LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
uint64_t *value)
{
uint64_t local_value;
- if (! value)
+ if (value == NULL)
+ {
value= &local_value;
+ }
return memcached_decrement_with_initial_by_key(ptr, key, key_length,
key, key_length,
uint64_t *value)
{
uint64_t local_value;
- if (not value)
+ if (value == NULL)
+ {
value= &local_value;
+ }
memcached_return_t rc;
if (memcached_failed(rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol)))
const char *buffer;
};
-static memcached_return_t _set_verbosity(const memcached_st *ptr,
+static memcached_return_t _set_verbosity(const memcached_st *,
const memcached_server_st *server,
void *context)
{
- memcached_return_t rc;
- memcached_st local_memc;
- memcached_st *memc_ptr;
- char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-
struct context_st *execute= (struct context_st *)context;
- (void)ptr;
- memc_ptr= memcached_create(&local_memc);
+ memcached_st local_memc;
+ memcached_st *memc_ptr= memcached_create(&local_memc);
- rc= memcached_server_add(memc_ptr, memcached_server_name(server), memcached_server_port(server));
+ memcached_return_t rc= memcached_server_add(memc_ptr, memcached_server_name(server), memcached_server_port(server));
if (rc == MEMCACHED_SUCCESS)
{
- memcached_server_write_instance_st instance=
- memcached_server_instance_fetch(memc_ptr, 0);
+ char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
+
+ memcached_server_write_instance_st instance= memcached_server_instance_fetch(memc_ptr, 0);
+
rc= memcached_do(instance, execute->buffer, execute->length, true);