From 2a097af3e3108677da0c3768f11c932cc2a427bd Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sun, 29 Jan 2012 18:15:48 -0800 Subject: [PATCH] Make use of memcached_fatal for determining state of loop processing. --- libmemcached/response.cc | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/libmemcached/response.cc b/libmemcached/response.cc index 437c4cc9..8ed3469c 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -776,22 +776,7 @@ memcached_return_t memcached_response(memcached_server_write_instance_st ptr, memcached_return_t rc= _read_one_response(ptr, buffer, buffer_length, junked_result_ptr); // @TODO should we return an error on another but a bad read case? - if ( - rc != MEMCACHED_DATA_EXISTS and - rc != MEMCACHED_DELETED and - rc != MEMCACHED_E2BIG and - rc != MEMCACHED_END and - rc != MEMCACHED_ERROR and - rc != MEMCACHED_ITEM and - rc != MEMCACHED_NOTFOUND and - rc != MEMCACHED_NOTSTORED and - rc != MEMCACHED_SERVER_ERROR and - rc != MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE and - rc != MEMCACHED_STAT and - rc != MEMCACHED_STORED and - rc != MEMCACHED_SUCCESS and - rc != MEMCACHED_VALUE - ) + if (memcached_fatal(rc)) { memcached_result_free(junked_result_ptr); return rc; -- 2.30.2