Improve tesing of command line apps
[awesomized/libmemcached] / libmemcached / return.h
index 378194fd9fe08d33aeb1d4ffa39ba0373dd54b77..fa36243f769db098cb474392384c6ba6c3d200d1 100644 (file)
@@ -115,4 +115,15 @@ static inline bool memcached_failed(memcached_return_t rc)
           rc != MEMCACHED_VALUE);
 }
 
+static inline bool memcached_fatal(memcached_return_t rc)
+{
+  return (rc != MEMCACHED_SUCCESS && 
+          rc != MEMCACHED_END && 
+          rc != MEMCACHED_STORED && 
+          rc != MEMCACHED_STAT && 
+          rc != MEMCACHED_DELETED &&
+          rc != MEMCACHED_BUFFERED &&
+          rc != MEMCACHED_VALUE);
+}
+
 #define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS)