aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-09-28 09:02:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-09-28 09:02:57 +0000
commitcc610f0d1fc5e48fddf6d598bec4b80b2e446838 (patch)
tree3784bddd3b0cef9570d5cf011ca7218d36733aab
parent8333644c8483cabbe4050381dab7381d7e7ed03e (diff)
now compiles warning-free when IPv6-enabled
-rw-r--r--lib/ftp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 0e8758c1d..6721d18aa 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -757,9 +757,7 @@ ftp_pasv_verbose(struct connectdata *conn,
#ifdef HAVE_INET_NTOA_R
char ntoa_buf[64];
#endif
-#ifndef ENABLE_IPV6
char hostent_buf[8192];
-#endif
#if defined(HAVE_INET_ADDR)
unsigned long address;
@@ -832,6 +830,7 @@ ftp_pasv_verbose(struct connectdata *conn,
#else
const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
#endif
+ port = 0; /* unused, prevent warning */
if (getnameinfo(addr->ai_addr, addr->ai_addrlen,
nbuf, sizeof(nbuf), sbuf, sizeof(sbuf), niflags)) {
snprintf(nbuf, sizeof(nbuf), "?");
@@ -840,8 +839,8 @@ ftp_pasv_verbose(struct connectdata *conn,
if (getnameinfo(addr->ai_addr, addr->ai_addrlen,
hbuf, sizeof(hbuf), NULL, 0, 0)) {
- infof(conn->data, "Connecting to %s port %s\n", nbuf, sbuf);
- }
+ infof(conn->data, "Connecting to %s (%s) port %s\n", nbuf, newhost, sbuf);
+ }
else {
infof(conn->data, "Connecting to %s (%s) port %s\n", hbuf, nbuf, sbuf);
}