char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
LIBMEMCACHED_MEMCACHED_FLUSH_START();
- if (ptr->number_of_hosts == 0)
+ unlikely (ptr->number_of_hosts == 0)
return MEMCACHED_NO_SERVERS;
for (x= 0; x < ptr->number_of_hosts; x++)
send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
"flush_all\r\n");
- rc= memcached_do(ptr, x, buffer, send_length, 1);
+ rc= memcached_do(&ptr->hosts[x], buffer, send_length, 1);
if (rc == MEMCACHED_SUCCESS)
- (void)memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL, x);
+ (void)memcached_response(&ptr->hosts[x], buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
}
LIBMEMCACHED_MEMCACHED_FLUSH_END();