summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2005-02-14 17:55:33 +0000
committerstefanf <stefanf@FreeBSD.org>2005-02-14 17:55:33 +0000
commit653ce89b7e29517b80423c1362bfa2969c59d220 (patch)
tree3a81abd3eca952a36e5eedb49cc3cf3ecfc96f52 /lib
parent3681db07f45c679ccb04c45b3cd2c1d8b2a0aaf8 (diff)
downloadFreeBSD-src-653ce89b7e29517b80423c1362bfa2969c59d220.zip
FreeBSD-src-653ce89b7e29517b80423c1362bfa2969c59d220.tar.gz
Use socklen_t.
Diffstat (limited to 'lib')
-rw-r--r--lib/libftpio/ftpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libftpio/ftpio.c b/lib/libftpio/ftpio.c
index 313f42b..dd7f394 100644
--- a/lib/libftpio/ftpio.c
+++ b/lib/libftpio/ftpio.c
@@ -782,6 +782,7 @@ ftp_login_session(FTP_t ftp, char *host, int af,
static int
ftp_file_op(FTP_t ftp, char *operation, char *file, FILE **fp, char *mode, off_t *seekto)
{
+ socklen_t sinlen;
int i,l,s;
char *q;
unsigned char addr[64];
@@ -873,7 +874,6 @@ ftp_file_op(FTP_t ftp, char *operation, char *file, FILE **fp, char *mode, off_t
}
} else if (strcmp(cmdstr, "EPSV") == 0) {
int port;
- int sinlen;
while (*q && *q != '(') /* ) */
q++;
if (!*q) {
@@ -951,16 +951,16 @@ ftp_file_op(FTP_t ftp, char *operation, char *file, FILE **fp, char *mode, off_t
}
#endif
- i = sizeof sin;
- getsockname(ftp->fd_ctrl, (struct sockaddr *)&sin, &i);
+ sinlen = sizeof sin;
+ getsockname(ftp->fd_ctrl, (struct sockaddr *)&sin, &sinlen);
sin.sin4.sin_port = 0;
i = ((struct sockaddr *)&sin)->sa_len;
if (bind(s, (struct sockaddr *)&sin, i) < 0) {
close(s);
return FAILURE;
}
- i = sizeof sin;
- getsockname(s,(struct sockaddr *)&sin,&i);
+ sinline = sizeof sin;
+ getsockname(s, (struct sockaddr *)&sin, &sinlen);
if (listen(s, 1) < 0) {
close(s);
return FAILURE;
OpenPOWER on IntegriCloud