Just clean up a call (use the previous method).
authorBrian Aker <brian@gaz>
Fri, 2 Apr 2010 02:31:28 +0000 (19:31 -0700)
committerBrian Aker <brian@gaz>
Fri, 2 Apr 2010 02:31:28 +0000 (19:31 -0700)
libmemcached/get.c

index 7d8d67684328006d6d79bb7e15757823e736204d..035f6ea2d9eb9a381fac49dbd0056191f485e15c 100644 (file)
@@ -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;