Updating test framework for startup/shutdown of memcached.
[m6w6/libmemcached] / libmemcached / stats.cc
index d5d34a84285562b9510dc174e38f9a122c01a309..6e2ef31f5140452111a66215abf90693a1c58f4b 100644 (file)
@@ -493,6 +493,7 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
 
     stat_instance= stats +x;
 
+    stat_instance->pid= -1;
     stat_instance->root= self;
 
     instance= memcached_server_instance_fetch(self, x);
@@ -577,14 +578,11 @@ char ** memcached_stat_get_keys(memcached_st *ptr,
   return list;
 }
 
-void memcached_stat_free(const memcached_st *ptr, memcached_stat_st *memc_stat)
+void memcached_stat_free(const memcached_st *, memcached_stat_st *memc_stat)
 {
-  if (not ptr)
-    return;
-
+  WATCHPOINT_ASSERT(memc_stat); // Be polite, but when debugging catch this as an error
   if (not memc_stat)
   {
-    WATCHPOINT_ASSERT(0); /* Be polite, but when debugging catch this as an error */
     return;
   }
 
@@ -594,7 +592,7 @@ void memcached_stat_free(const memcached_st *ptr, memcached_stat_st *memc_stat)
     return;
   }
 
-  libmemcached_free(ptr, memc_stat);
+  libmemcached_free(NULL, memc_stat);
 }
 
 static memcached_return_t call_stat_fn(memcached_st *ptr,