From: Brian Aker Date: Sat, 31 Dec 2011 00:37:31 +0000 (-0800) Subject: Style change X-Git-Tag: 1.0.3~3^2~1^2~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3c74b93b3db239f4240c907a91678ed401fa41ad;p=m6w6%2Flibmemcached Style change --- diff --git a/libmemcached/auto.cc b/libmemcached/auto.cc index 256a849a..c1764c4d 100644 --- a/libmemcached/auto.cc +++ b/libmemcached/auto.cc @@ -53,7 +53,7 @@ static memcached_return_t text_incr_decr(memcached_server_write_instance_st inst memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("incr ") }, { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, @@ -119,7 +119,7 @@ static memcached_return_t binary_incr_decr(memcached_server_write_instance_st in request.message.body.initial= memcached_htonll(initial); request.message.body.expiration= htonl((uint32_t) expiration); - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, diff --git a/libmemcached/delete.cc b/libmemcached/delete.cc index 99f3970b..1c4aba6c 100644 --- a/libmemcached/delete.cc +++ b/libmemcached/delete.cc @@ -51,7 +51,7 @@ static inline memcached_return_t ascii_delete(memcached_server_write_instance_st const bool reply, const bool flush) { - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("delete ") }, { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, @@ -115,7 +115,7 @@ static inline memcached_return_t binary_delete(memcached_server_write_instance_s } } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, diff --git a/libmemcached/dump.cc b/libmemcached/dump.cc index 6e187478..830c3ff4 100644 --- a/libmemcached/dump.cc +++ b/libmemcached/dump.cc @@ -64,7 +64,7 @@ static memcached_return_t ascii_dump(memcached_st *ptr, memcached_dump_fn *callb memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("stats cachedump ") }, { buffer, buffer_length }, diff --git a/libmemcached/exist.cc b/libmemcached/exist.cc index e9e6208b..6903f83b 100644 --- a/libmemcached/exist.cc +++ b/libmemcached/exist.cc @@ -38,7 +38,7 @@ static memcached_return_t ascii_exist(memcached_st *memc, memcached_server_write_instance_st instance, const char *key, size_t key_length) { - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("add ") }, { memcached_array_string(memc->_namespace), memcached_array_size(memc->_namespace) }, @@ -93,7 +93,7 @@ static memcached_return_t binary_exist(memcached_st *memc, memcached_server_writ +memcached_array_size(memc->_namespace) +request.message.header.request.extlen)); - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, send_length }, { memcached_array_string(memc->_namespace), memcached_array_size(memc->_namespace) }, diff --git a/libmemcached/flush.cc b/libmemcached/flush.cc index f434b917..44a1429a 100644 --- a/libmemcached/flush.cc +++ b/libmemcached/flush.cc @@ -82,7 +82,7 @@ static memcached_return_t memcached_flush_textual(memcached_st *ptr, memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("flush_all ") }, { buffer, send_length }, @@ -143,7 +143,7 @@ static memcached_return_t memcached_flush_binary(memcached_st *ptr, request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSHQ; } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) } }; diff --git a/libmemcached/get.cc b/libmemcached/get.cc index a67e7618..814c5bf7 100644 --- a/libmemcached/get.cc +++ b/libmemcached/get.cc @@ -303,7 +303,7 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr, instance= memcached_server_instance_fetch(ptr, server_key); - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { get_command, get_command_length }, { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, @@ -517,7 +517,7 @@ static memcached_return_t simple_binary_mget(memcached_st *ptr, request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; request.message.header.request.bodylen= htonl((uint32_t)( key_length[x] + memcached_array_size(ptr->_namespace))); - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, @@ -650,7 +650,7 @@ static memcached_return_t replication_binary_mget(memcached_st *ptr, * that we might have processed some of the responses etc. For now, * just make sure we work _correctly_ */ - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, diff --git a/libmemcached/io.cc b/libmemcached/io.cc index ae86fa21..2b463ec7 100644 --- a/libmemcached/io.cc +++ b/libmemcached/io.cc @@ -674,7 +674,7 @@ size_t io_vector_total_size(libmemcached_io_vector_st* vector, const size_t numb } ssize_t memcached_io_writev(memcached_server_write_instance_st ptr, - const struct libmemcached_io_vector_st *vector, + libmemcached_io_vector_st *vector, size_t number_of, bool with_flush) { ssize_t total= 0; diff --git a/libmemcached/io.hpp b/libmemcached/io.hpp index d91150f8..4a7b3cf0 100644 --- a/libmemcached/io.hpp +++ b/libmemcached/io.hpp @@ -46,7 +46,7 @@ ssize_t memcached_io_write(memcached_server_write_instance_st ptr, const void *buffer, size_t length, bool with_flush); ssize_t memcached_io_writev(memcached_server_write_instance_st ptr, - const struct libmemcached_io_vector_st *vector, + libmemcached_io_vector_st *vector, size_t number_of, bool with_flush); memcached_return_t memcached_io_wait_for_write(memcached_server_write_instance_st ptr); diff --git a/libmemcached/quit.cc b/libmemcached/quit.cc index f228c881..9aadd605 100644 --- a/libmemcached/quit.cc +++ b/libmemcached/quit.cc @@ -62,7 +62,7 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death) request.message.header.request.opcode = PROTOCOL_BINARY_CMD_QUIT; request.message.header.request.datatype = PROTOCOL_BINARY_RAW_BYTES; - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) } }; @@ -71,7 +71,7 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death) } else { - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("quit\r\n") } }; diff --git a/libmemcached/sasl.cc b/libmemcached/sasl.cc index 2e9bdc63..77c5fdf7 100644 --- a/libmemcached/sasl.cc +++ b/libmemcached/sasl.cc @@ -229,7 +229,7 @@ memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *s do { /* send the packet */ - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { chosenmech, keylen }, diff --git a/libmemcached/stats.cc b/libmemcached/stats.cc index c01b2acc..a0a965f1 100644 --- a/libmemcached/stats.cc +++ b/libmemcached/stats.cc @@ -360,7 +360,7 @@ static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat, request.message.header.request.keylen= htons(uint16_t(args_length)); request.message.header.request.bodylen= htonl(uint32_t( args_length)); - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { args, args_length } @@ -374,7 +374,7 @@ static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat, } else { - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) } }; @@ -437,7 +437,7 @@ static memcached_return_t ascii_stats_fetch(memcached_stat_st *memc_stat, memcached_server_write_instance_st instance, struct local_context *check) { - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("stats ") }, { args, args_length }, diff --git a/libmemcached/storage.cc b/libmemcached/storage.cc index 629b95dc..5453416f 100644 --- a/libmemcached/storage.cc +++ b/libmemcached/storage.cc @@ -160,7 +160,7 @@ static memcached_return_t memcached_send_binary(memcached_st *ptr, request.message.header.request.cas= memcached_htonll(cas); } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, send_length }, { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, @@ -271,7 +271,7 @@ static memcached_return_t memcached_send_ascii(memcached_st *ptr, } } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { storage_op_string(verb), strlen(storage_op_string(verb))}, { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, diff --git a/libmemcached/touch.cc b/libmemcached/touch.cc index ac52b3a1..ba73146f 100644 --- a/libmemcached/touch.cc +++ b/libmemcached/touch.cc @@ -50,7 +50,7 @@ static memcached_return_t ascii_touch(memcached_server_write_instance_st instanc memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)")); } - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { memcached_literal_param("touch ") }, { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, @@ -82,7 +82,7 @@ static memcached_return_t binary_touch(memcached_server_write_instance_st instan request.message.header.request.bodylen= htonl((uint32_t)(key_length +memcached_array_size(instance->root->_namespace) +request.message.header.request.extlen)); request.message.body.expiration= htonl((uint32_t) expiration); - struct libmemcached_io_vector_st vector[]= + libmemcached_io_vector_st vector[]= { { request.bytes, sizeof(request.bytes) }, { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) },