Simply free so that we can not have a bunch of if/else around using custom/not custom...
[awesomized/libmemcached] / libmemcached / memcached.cc
index 2bba44a1aaa719dd75217451b936b03b0d5c55b1..21306f2a94f784e3b1fae0e4ad834f53209b1b88 100644 (file)
@@ -157,8 +157,7 @@ static void _free(memcached_st *ptr, bool release_st)
   if (ptr->on_cleanup)
     ptr->on_cleanup(ptr);
 
-  if (ptr->ketama.continuum)
-    libmemcached_free(ptr, ptr->ketama.continuum);
+  libmemcached_free(ptr, ptr->ketama.continuum);
 
   memcached_array_free(ptr->prefix_key);
   ptr->prefix_key= NULL;
@@ -190,7 +189,7 @@ memcached_st *memcached_create(memcached_st *ptr)
   {
     ptr= (memcached_st *)malloc(sizeof(memcached_st));
 
-    if (! ptr)
+    if (not ptr)
     {
       return NULL; /*  MEMCACHED_MEMORY_ALLOCATION_FAILURE */
     }