mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
turn niflags into a define named NIFLAGS
This commit is contained in:
parent
d29590f583
commit
85838a8966
@ -1122,9 +1122,9 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
|||||||
|
|
||||||
struct sockaddr *sa=(struct sockaddr *)&ss;
|
struct sockaddr *sa=(struct sockaddr *)&ss;
|
||||||
#ifdef NI_WITHSCOPEID
|
#ifdef NI_WITHSCOPEID
|
||||||
const int niflags = NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID;
|
#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID
|
||||||
#else
|
#else
|
||||||
const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
|
#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV
|
||||||
#endif
|
#endif
|
||||||
unsigned char *ap;
|
unsigned char *ap;
|
||||||
unsigned char *pp;
|
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,
|
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf), NULL, 0,
|
||||||
niflags);
|
NIFLAGS);
|
||||||
if(rc) {
|
if(rc) {
|
||||||
failf(data, "getnameinfo() returned %d\n", rc);
|
failf(data, "getnameinfo() returned %d\n", rc);
|
||||||
return CURLE_FTP_PORT_FAILED;
|
return CURLE_FTP_PORT_FAILED;
|
||||||
@ -1236,7 +1236,8 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
|||||||
if (eprtaf < 0)
|
if (eprtaf < 0)
|
||||||
continue;
|
continue;
|
||||||
if (getnameinfo((struct sockaddr *)&ss, sslen,
|
if (getnameinfo((struct sockaddr *)&ss, sslen,
|
||||||
portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp), niflags))
|
portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp),
|
||||||
|
NIFLAGS))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* do not transmit IPv6 scope identifier to the wire */
|
/* do not transmit IPv6 scope identifier to the wire */
|
||||||
|
Loading…
Reference in New Issue
Block a user