aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Crosby <dave@dafyddcrosby.com>2015-07-26 06:08:52 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-11 12:59:28 +0000
commit14798c25c4bd58fcd906eac7a2df4578b00056ef (patch)
tree9c7c681ee783e19ba7114a6f6d7332e41da989bd
parentUse unsigned int for max_count (diff)
downloadw3m-14798c25c4bd58fcd906eac7a2df4578b00056ef.tar.gz
w3m-14798c25c4bd58fcd906eac7a2df4578b00056ef.zip
Move sockent for splint
Diffstat (limited to '')
-rw-r--r--ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ftp.c b/ftp.c
index 2ad829c..2ca0247 100644
--- a/ftp.c
+++ b/ftp.c
@@ -140,7 +140,6 @@ ftp_login(FTP ftp)
socklen_t socknamelen = sizeof(sockname);
if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
- struct hostent *sockent;
Str tmp = Strnew_charp(ftp->pass);
#ifdef INET6
char hostbuf[NI_MAXHOST];
@@ -157,6 +156,7 @@ ftp_login(FTP ftp)
Strcat_charp(tmp, "unknown");
#else
+ struct hostent *sockent;
if ((sockent = gethostbyaddr((char *)&sockname.sin_addr,
sizeof(sockname.sin_addr),
sockname.sin_family)))