projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix to make sure we do not copy an element on top of itself.
[m6w6/libmemcached]
/
libmemcached
/
memcached_get.c
diff --git
a/libmemcached/memcached_get.c
b/libmemcached/memcached_get.c
index dcaa8988a257344a543c34cf39e0fe6963c714c5..dd02cf29c7151362fd87f3ea47a40fd3d7b11b2f 100644
(file)
--- a/
libmemcached/memcached_get.c
+++ b/
libmemcached/memcached_get.c
@@
-250,6
+250,7
@@
static memcached_return binary_mget_by_key(memcached_st *ptr,
unsigned int number_of_keys)
{
memcached_return rc= MEMCACHED_NOTFOUND;
unsigned int number_of_keys)
{
memcached_return rc= MEMCACHED_NOTFOUND;
+ uint32_t x;
int flush= number_of_keys == 1;
int flush= number_of_keys == 1;
@@
-257,7
+258,7
@@
static memcached_return binary_mget_by_key(memcached_st *ptr,
If a server fails we warn about errors and start all over with sending keys
to the server.
*/
If a server fails we warn about errors and start all over with sending keys
to the server.
*/
- for (
int
x= 0; x < number_of_keys; x++)
+ for (x= 0; x < number_of_keys; x++)
{
unsigned int server_key;
{
unsigned int server_key;
@@
-273,7
+274,7
@@
static memcached_return binary_mget_by_key(memcached_st *ptr,
continue;
}
continue;
}
- protocol_binary_request_getk request= {
0
};
+ protocol_binary_request_getk request= {
.bytes= {0}
};
request.message.header.request.magic= PROTOCOL_BINARY_REQ;
if (number_of_keys == 1)
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK;
request.message.header.request.magic= PROTOCOL_BINARY_REQ;
if (number_of_keys == 1)
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK;
@@
-301,12
+302,12
@@
static memcached_return binary_mget_by_key(memcached_st *ptr,
/*
* Send a noop command to flush the buffers
*/
/*
* Send a noop command to flush the buffers
*/
- protocol_binary_request_noop request= {
0
};
+ protocol_binary_request_noop request= {
.bytes= {0}
};
request.message.header.request.magic= PROTOCOL_BINARY_REQ;
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_NOOP;
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
request.message.header.request.magic= PROTOCOL_BINARY_REQ;
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_NOOP;
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
- for (
int
x= 0; x < ptr->number_of_hosts; x++)
+ for (x= 0; x < ptr->number_of_hosts; x++)
if (memcached_server_response_count(&ptr->hosts[x]))
{
if (memcached_io_write(&ptr->hosts[x], NULL, 0, 1) == -1)
if (memcached_server_response_count(&ptr->hosts[x]))
{
if (memcached_io_write(&ptr->hosts[x], NULL, 0, 1) == -1)