Move sockent for splint
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
adcc02592c
commit
14798c25c4
2
ftp.c
2
ftp.c
@@ -140,7 +140,6 @@ ftp_login(FTP ftp)
|
|||||||
socklen_t socknamelen = sizeof(sockname);
|
socklen_t socknamelen = sizeof(sockname);
|
||||||
|
|
||||||
if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
|
if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
|
||||||
struct hostent *sockent;
|
|
||||||
Str tmp = Strnew_charp(ftp->pass);
|
Str tmp = Strnew_charp(ftp->pass);
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
char hostbuf[NI_MAXHOST];
|
char hostbuf[NI_MAXHOST];
|
||||||
@@ -157,6 +156,7 @@ ftp_login(FTP ftp)
|
|||||||
Strcat_charp(tmp, "unknown");
|
Strcat_charp(tmp, "unknown");
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
struct hostent *sockent;
|
||||||
if ((sockent = gethostbyaddr((char *)&sockname.sin_addr,
|
if ((sockent = gethostbyaddr((char *)&sockname.sin_addr,
|
||||||
sizeof(sockname.sin_addr),
|
sizeof(sockname.sin_addr),
|
||||||
sockname.sin_family)))
|
sockname.sin_family)))
|
||||||
|
Reference in New Issue
Block a user