]> granicus.if.org Git - curl/commitdiff
David LeBlanc corrected one of my mistakes
authorDaniel Stenberg <daniel@haxx.se>
Wed, 31 May 2000 06:31:31 +0000 (06:31 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 31 May 2000 06:31:31 +0000 (06:31 +0000)
lib/hostip.c

index 76a781148f2db27cb802b6e6f0a48eb50b836484..c1df3096b12c817968d6c7be841a25dc2df62684 100644 (file)
@@ -113,7 +113,8 @@ struct hostent *GetHost(struct UrlData *data,
     h->h_addr_list[1] = NULL;
     h->h_addrtype = AF_INET;
     h->h_length = sizeof(*addrentry);
-    h->h_name = (char*)(h->h_addr_list + h->h_length);
+    h->h_name = *(h->h_addr_list) + h->h_length;
+    /* bad one h->h_name = (char*)(h->h_addr_list + h->h_length); */
     MakeIP(ntohl(in),h->h_name,buf_size - (long)(h->h_name) + (long)buf);
 #if defined(HAVE_GETHOSTBYNAME_R)
   }