- if (ptr->number_of_hosts)
- {
- new_host_list= (memcached_server_st *)realloc(ptr->hosts,
- sizeof(memcached_server_st) * (ptr->number_of_hosts+1));
- if (!new_host_list)
- return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
- host_reset(&new_host_list[ptr->number_of_hosts], NULL, 0,
- MEMCACHED_CONNECTION_UNKNOWN);
- }
- else
- {
- new_host_list=
- (memcached_server_st *)malloc(sizeof(memcached_server_st) * 2);
- if (!new_host_list)
- return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
- host_reset(&new_host_list[0], NULL, 0, MEMCACHED_CONNECTION_UNKNOWN);
- host_reset(&new_host_list[1], NULL, 0, MEMCACHED_CONNECTION_UNKNOWN);
- }
+ new_host_list= (memcached_server_st *)realloc(ptr->hosts,
+ sizeof(memcached_server_st) * (ptr->number_of_hosts+1));
+ if (!new_host_list)
+ return MEMCACHED_MEMORY_ALLOCATION_FAILURE;