X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=libmemcached%2Fquit.c;h=a8f70402062d7c1e87a486a2ac54959827091981;hb=ad62715a7d4dc200a9b77ae61fc62a4a896a865f;hp=dc11e97fcea5e65356c5775ca5147d2a01b733ad;hpb=474deb0826ebcd7b748e15dd7f0fc6da0f64cd89;p=m6w6%2Flibmemcached diff --git a/libmemcached/quit.c b/libmemcached/quit.c index dc11e97f..a8f70402 100644 --- a/libmemcached/quit.c +++ b/libmemcached/quit.c @@ -72,12 +72,12 @@ void memcached_quit(memcached_st *ptr) unsigned int x; if (ptr->hosts == NULL || - ptr->number_of_hosts == 0) + memcached_server_count(ptr) == 0) return; - if (ptr->hosts && ptr->number_of_hosts) + if (ptr->hosts && memcached_server_count(ptr)) { - for (x= 0; x < ptr->number_of_hosts; x++) + for (x= 0; x < memcached_server_count(ptr); x++) memcached_quit_server(&ptr->hosts[x], 0); } }