1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Avoid generation of additional warnings

This commit is contained in:
Yang Tse 2005-12-11 18:29:18 +00:00
parent 36485e56ed
commit e3f523ab2a

View File

@ -780,7 +780,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
*/ */
struct Curl_sockaddr_storage ss; struct Curl_sockaddr_storage ss;
struct addrinfo *res, *ai; struct addrinfo *res, *ai;
size_t sslen; socklen_t sslen;
char hbuf[NI_MAXHOST]; char hbuf[NI_MAXHOST];
struct sockaddr *sa=(struct sockaddr *)&ss; struct sockaddr *sa=(struct sockaddr *)&ss;
unsigned char *ap; unsigned char *ap;
@ -812,7 +812,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
return CURLE_FTP_PORT_FAILED; return CURLE_FTP_PORT_FAILED;
} }
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf), NULL, rc = getnameinfo((struct sockaddr *)&ss, (size_t)sslen, hbuf, sizeof(hbuf), NULL,
0, NIFLAGS); 0, NIFLAGS);
if(rc) { if(rc) {
failf(data, "getnameinfo() returned %d\n", rc); failf(data, "getnameinfo() returned %d\n", rc);
@ -921,7 +921,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
if (EPRT == fcmd) { if (EPRT == fcmd) {
if (eprtaf < 0) if (eprtaf < 0)
continue; continue;
if (getnameinfo((struct sockaddr *)&ss, sslen, if (getnameinfo((struct sockaddr *)&ss, (size_t)sslen,
portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp), portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp),
NIFLAGS)) NIFLAGS))
continue; continue;