diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-16 04:39:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-16 04:39:17 +0000 |
commit | b0a7d2f6503a7398c8875cb7f26f45c62730167b (patch) | |
tree | 1505609c99f9b0b5b7fc7977fd17cc211b0299ea /usr.bin/ftp/ftp.c | |
parent | 417d2189ae094c7afdaa7d7b44b8bcaeb1a94a6f (diff) |
type corrections and other delinting
Diffstat (limited to 'usr.bin/ftp/ftp.c')
-rw-r--r-- | usr.bin/ftp/ftp.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index 8510254ecb9..7156fc3760a 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp.c,v 1.56 2004/07/20 03:50:25 deraadt Exp $ */ +/* $OpenBSD: ftp.c,v 1.57 2004/09/16 04:39:16 deraadt Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* @@ -60,7 +60,7 @@ */ #if !defined(lint) && !defined(SMALL) -static char rcsid[] = "$OpenBSD: ftp.c,v 1.56 2004/07/20 03:50:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ftp.c,v 1.57 2004/09/16 04:39:16 deraadt Exp $"; #endif /* not lint and not SMALL */ #include <sys/types.h> @@ -119,11 +119,12 @@ FILE *cin, *cout; char * hookup(char *host, char *port) { - int s, len, tos, error; + int s, tos, error; static char hostnamebuf[MAXHOSTNAMELEN]; struct addrinfo hints, *res, *res0; char hbuf[NI_MAXHOST]; char *cause = "unknown"; + socklen_t namelen; epsv4bad = 0; @@ -214,10 +215,10 @@ hookup(char *host, char *port) return 0; } memcpy(&hisctladdr, res->ai_addr, res->ai_addrlen); - len = res->ai_addrlen; + namelen = res->ai_addrlen; freeaddrinfo(res0); res0 = res = NULL; - if (getsockname(s, (struct sockaddr *)&myctladdr, &len) < 0) { + if (getsockname(s, (struct sockaddr *)&myctladdr, &namelen) < 0) { warn("getsockname"); code = -1; goto bad; @@ -267,8 +268,9 @@ bad: return ((char *)0); } +/* ARGSUSED */ void -cmdabort(int notused) +cmdabort(int signo) { alarmtimer(0); @@ -444,8 +446,9 @@ getreply(int expecteof) jmp_buf sendabort; +/* ARGSUSED */ void -abortsend(int notused) +abortsend(int signo) { alarmtimer(0); @@ -737,8 +740,9 @@ abort: jmp_buf recvabort; +/* ARGSUSED */ void -abortrecv(int notused) +abortrecv(int signo) { alarmtimer(0); @@ -947,7 +951,7 @@ recvrequest(const char *cmd, const char * volatile local, const char *remote, } errno = d = 0; while ((c = read(fileno(din), buf, bufsize)) > 0) { - size_t wr; + ssize_t wr; size_t rd = c; d = 0; @@ -1130,12 +1134,13 @@ int initconn(void) { char *p, *a; - int result = ERROR, len, tmpno = 0; + int result = ERROR, tmpno = 0; int on = 1; int error; u_int addr[16], port[2]; u_int af, hal, pal; char *pasvcmd = NULL; + socklen_t namelen; if (myctladdr.su_family == AF_INET6 && (IN6_IS_ADDR_LINKLOCAL(&myctladdr.su_sin6.sin6_addr) @@ -1413,8 +1418,8 @@ noport: setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof(on)) < 0) warn("setsockopt (ignored)"); - len = sizeof(data_addr); - if (getsockname(data, (struct sockaddr *)&data_addr, &len) < 0) { + namelen = sizeof(data_addr); + if (getsockname(data, (struct sockaddr *)&data_addr, &namelen) < 0) { warn("getsockname"); goto bad; } @@ -1518,7 +1523,8 @@ FILE * dataconn(const char *lmode) { union sockunion from; - int s, fromlen = myctladdr.su_len; + socklen_t fromlen = myctladdr.su_len; + int s; if (passivemode) return (fdopen(data, lmode)); @@ -1543,8 +1549,9 @@ dataconn(const char *lmode) return (fdopen(data, lmode)); } +/* ARGSUSED */ void -psummary(int notused) +psummary(int signo) { int save_errno = errno; @@ -1553,8 +1560,9 @@ psummary(int notused) errno = save_errno; } +/* ARGSUSED */ void -psabort(int notused) +psabort(int signo) { alarmtimer(0); @@ -1648,8 +1656,9 @@ pswitch(int flag) } } +/* ARGSUSED */ void -abortpt(int notused) +abortpt(int signo) { alarmtimer(0); @@ -1782,6 +1791,7 @@ abort: (void)signal(SIGINT, oldintr); } +/* ARGSUSED */ void reset(int argc, char *argv[]) { |