Updating test output
[m6w6/libmemcached] / tests / function.c
index 3819eae71e598458d155db98824965d584fb9f0b..4ab8fc26d9595f55ad46fd87d6f896016f3f9a42 100644 (file)
@@ -542,13 +542,14 @@ uint8_t get_test4(memcached_st *memc)
   return 0;
 }
 
+/* Do not copy the style of this code, I just access hosts to testthis function */
 uint8_t stats_servername_test(memcached_st *memc)
 {
   memcached_return rc;
   memcached_stat_st stat;
   rc= memcached_stat_servername(&stat, NULL,
-                                 "localhost"
-                                 MEMCACHED_DEFAULT_PORT);
+                                 memc->hosts[0].hostname
+                                 memc->hosts[0].port);
 
   return 0;
 }
@@ -819,10 +820,9 @@ uint8_t get_stats(memcached_st *memc)
 
  for (x= 0; x < memcached_server_count(memc); x++)
  {
-   list= memcached_stat_get_keys(memc, &stat[x], &rc);
+   list= memcached_stat_get_keys(memc, stat+x, &rc);
    assert(rc == MEMCACHED_SUCCESS);
-   for (ptr= list; *ptr; ptr++)
-     printf("Found key %s\n", *ptr);
+   for (ptr= list; *ptr; ptr++);
 
    free(list);
  }