From: Brian Aker Date: Mon, 30 Jan 2012 02:15:48 +0000 (-0800) Subject: Make use of memcached_fatal for determining state of loop processing. X-Git-Tag: 1.0.5~78 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2a097af3e3108677da0c3768f11c932cc2a427bd;p=m6w6%2Flibmemcached Make use of memcached_fatal for determining state of loop processing. --- 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;