diff options
author | 2003-06-23 17:22:29 +0000 | |
---|---|---|
committer | 2003-06-23 17:22:29 +0000 | |
commit | a212240089a9adc104a34688aaaf565c19c6ce3f (patch) | |
tree | eb1edc0c382fa3977702edcddf7f8d762e450981 /libexec/ftp-proxy | |
parent | grok more of the dev/ and net*/ and crypto/ ioctls (diff) | |
download | wireguard-openbsd-a212240089a9adc104a34688aaaf565c19c6ce3f.tar.xz wireguard-openbsd-a212240089a9adc104a34688aaaf565c19c6ce3f.zip |
delinting from beck
Diffstat (limited to 'libexec/ftp-proxy')
-rw-r--r-- | libexec/ftp-proxy/ftp-proxy.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/libexec/ftp-proxy/ftp-proxy.c b/libexec/ftp-proxy/ftp-proxy.c index 50cd6bf865b..99a213c081d 100644 --- a/libexec/ftp-proxy/ftp-proxy.c +++ b/libexec/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.29 2003/03/20 01:34:48 david Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.30 2003/06/23 17:22:29 deraadt Exp $ */ /* * Copyright (c) 1996-2001 @@ -461,7 +461,7 @@ static void connect_pasv_backchannel(void) { struct sockaddr_in listen_sa; - int salen; + socklen_t salen; /* * We are about to accept a connection from the client. @@ -504,7 +504,7 @@ static void connect_port_backchannel(void) { struct sockaddr_in listen_sa; - int salen; + socklen_t salen; /* * We are about to accept a connection from the server. @@ -603,7 +603,7 @@ do_client_cmd(struct csiob *client, struct csiob *server) strlen("user ")) == 0) { char *cp; - cp = client->line_buffer + strlen("user "); + cp = (char *) client->line_buffer + strlen("user "); if ((strcasecmp(cp, "ftp\r\n") != 0) && (strcasecmp(cp, "anonymous\r\n") != 0)) { /* @@ -624,7 +624,7 @@ do_client_cmd(struct csiob *client, struct csiob *server) } while (j >= 0 && j < i); sendbuf = NULL; } else - sendbuf = client->line_buffer; + sendbuf = (char *)client->line_buffer; } else if ((strncasecmp((char *)client->line_buffer, "eprt ", strlen("eprt ")) == 0)) { @@ -634,7 +634,7 @@ do_client_cmd(struct csiob *client, struct csiob *server) unsigned long proto; j = 0; - line = strdup(client->line_buffer+strlen("eprt ")); + line = strdup((char *)client->line_buffer+strlen("eprt ")); if (line == NULL) { syslog(LOG_ERR, "insufficient memory"); exit(EX_UNAVAILABLE); @@ -755,13 +755,11 @@ out: } else if (strncasecmp((char *)client->line_buffer, "port ", strlen("port ")) == 0) { unsigned int values[6]; - int byte_number; - u_char *tailptr; + char *tailptr; debuglog(1, "Got a PORT command"); - tailptr = &client->line_buffer[strlen("port ")]; - byte_number = 0; + tailptr = (char *)&client->line_buffer[strlen("port ")]; values[0] = 0; i = sscanf(tailptr, "%u,%u,%u,%u,%u,%u", &values[0], @@ -815,7 +813,7 @@ out: sendbuf = tbuf; } else - sendbuf = client->line_buffer; + sendbuf = (char *)client->line_buffer; /* *send our (possibly modified) control command in sendbuf @@ -876,13 +874,12 @@ do_server_reply(struct csiob *server, struct csiob *client) continuing = 0; if (code == 227 && !NatMode) { unsigned int values[6]; - u_char *tailptr; - int byte_number; + char *tailptr; debuglog(1, "Got a PASV reply"); debuglog(1, "{%s}", (char *)server->line_buffer); - tailptr = strchr((char *)server->line_buffer, '('); + tailptr = (char *)strchr((char *)server->line_buffer, '('); if (tailptr == NULL) { tailptr = strrchr((char *)server->line_buffer, ' '); if (tailptr == NULL) { @@ -892,7 +889,6 @@ do_server_reply(struct csiob *server, struct csiob *client) } tailptr++; /* skip past space or ( */ - byte_number = 0; values[0] = 0; i = sscanf(tailptr, "%u,%u,%u,%u,%u,%u", &values[0], @@ -937,7 +933,7 @@ do_server_reply(struct csiob *server, struct csiob *client) sendbuf = tbuf; } else { sendit: - sendbuf = server->line_buffer; + sendbuf = (char *)server->line_buffer; } /* @@ -961,7 +957,8 @@ main(int argc, char *argv[]) { struct csiob client_iob, server_iob; struct sigaction new_sa, old_sa; - int sval, ch, salen, flags, i; + int sval, ch, flags, i; + socklen_t salen; int one = 1; long timeout_seconds = 0; struct timeval tv; |