From: Brian Aker Date: Fri, 2 Apr 2010 02:31:28 +0000 (-0700) Subject: Just clean up a call (use the previous method). X-Git-Tag: 0.40~26 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=648b04703e752c8146f42c913b7f25ce7eca2196;p=m6w6%2Flibmemcached Just clean up a call (use the previous method). --- diff --git a/libmemcached/get.c b/libmemcached/get.c index 7d8d6768..035f6ea2 100644 --- a/libmemcached/get.c +++ b/libmemcached/get.c @@ -406,24 +406,9 @@ 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] + ptr->prefix_key_length)); - if (memcached_io_write(instance, request.bytes, sizeof(request.bytes), false) == -1) - { - memcached_server_response_reset(instance); - rc= MEMCACHED_SOME_ERRORS; - continue; - } - - if (ptr->prefix_key_length) - { - if (memcached_io_write(instance, ptr->prefix_key, ptr->prefix_key_length, false) == -1) - { - memcached_server_response_reset(instance); - rc= MEMCACHED_SOME_ERRORS; - continue; - } - } - - if (memcached_io_write(instance, keys[x], key_length[x], flush) == -1) + if ((memcached_io_write(instance, request.bytes, sizeof(request.bytes), false) == -1) || + (memcached_io_write(instance, ptr->prefix_key, ptr->prefix_key_length, false) == -1) || + (memcached_io_write(instance, keys[x], key_length[x], flush) == -1)) { memcached_server_response_reset(instance); rc= MEMCACHED_SOME_ERRORS;