title: inet_ntop doesn't return proper ip address
body: <p>I need to get the ip address of api.openweathermap.org.</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>const char *host = strtok(url_data_string,"/"); // an IP address or a hostname, like "www.google.com" by itself
  
      struct addrinfo hints = {0};
  
      hints.ai_family = AF_INET;
      hints.ai_socktype = SOCK_STREAM;
      //hints.ai_protocol = 80;
      struct addrinfo *addr = NULL;
      int ret = getaddrinfo(host, NULL , &amp;hints, &amp;addr);
      printf("asdd %s \n", host);
      char *ip_string = malloc(sizeof(char) * 2000);
      struct sockaddr_in target;
      void *addrCount = &amp;((struct sockaddr_in*)addr-&gt;ai_addr)-&gt;sin_addr;
      if (ret == 0)
      {
  
          inet_ntop(addr-&gt;ai_family, addrCount, ip_string , sizeof(ip_string));
          freeaddrinfo(addr);
          printf("%s\n",ip_string);
      }
      else {
          printf("Error\n");
      }
  </code></pre>
  
  <p>The output is a random string,like "��jk5" for example,it should be 82.196.7.246</p>