/* Return # of addresses in a Curl_addrinfo struct  */
int Curl_num_addresses(const Curl_addrinfo *addr)
/* Return # of addresses in a Curl_addrinfo struct  */
int Curl_num_addresses(const Curl_addrinfo *addr)
{
  int i = 0;
  while(addr) {
    addr = addr->ai_next;
    i++;
  }
  return i;
}