]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
use inet_pton() correctly!
authorDaniel Stenberg <daniel@haxx.se>
Fri, 20 Aug 2004 09:11:52 +0000 (09:11 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Aug 2004 09:11:52 +0000 (09:11 +0000)
lib/hostip6.c

index 596a5733d5b961b9dac2ce34f6a7e365ea80b404..d01c4476e441d134faad988779cbb5f300b02c1a 100644 (file)
@@ -247,7 +247,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
     }
   }
 
-  if(1 == inet_pton(pf, addrbuf, sizeof(addrbuf))) {
+  if(1 == inet_pton(pf, hostname, addrbuf)) {
     /* the given address is numerical only, prevent a reverse lookup */
     ai_flags = AI_NUMERICHOST;
   }