aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-10 15:24:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-10 15:24:56 +0000
commit85838a8966692831cf7d3744b34f5a04260366fd (patch)
treead470dac3f85fbadd39214f6b819e2a407b37e8b
parentd29590f583b4a01c16e3950631f228f5956b8fe3 (diff)
turn niflags into a define named NIFLAGS
-rw-r--r--lib/ftp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 950ec0eac..14b9df39a 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1122,9 +1122,9 @@ CURLcode ftp_use_port(struct connectdata *conn)
struct sockaddr *sa=(struct sockaddr *)&ss;
#ifdef NI_WITHSCOPEID
- const int niflags = NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID;
+#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID
#else
- const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
+#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV
#endif
unsigned char *ap;
unsigned char *pp;
@@ -1146,7 +1146,7 @@ CURLcode ftp_use_port(struct connectdata *conn)
}
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf), NULL, 0,
- niflags);
+ NIFLAGS);
if(rc) {
failf(data, "getnameinfo() returned %d\n", rc);
return CURLE_FTP_PORT_FAILED;
@@ -1236,7 +1236,8 @@ CURLcode ftp_use_port(struct connectdata *conn)
if (eprtaf < 0)
continue;
if (getnameinfo((struct sockaddr *)&ss, sslen,
- portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp), niflags))
+ portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp),
+ NIFLAGS))
continue;
/* do not transmit IPv6 scope identifier to the wire */