diff options
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r-- | usr.bin/ftp/cmds.c | 19 | ||||
-rw-r--r-- | usr.bin/ftp/util.c | 22 |
2 files changed, 4 insertions, 37 deletions
diff --git a/usr.bin/ftp/cmds.c b/usr.bin/ftp/cmds.c index 2f43bb6894a..8f5c8808c8f 100644 --- a/usr.bin/ftp/cmds.c +++ b/usr.bin/ftp/cmds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmds.c,v 1.57 2007/09/11 15:47:17 gilles Exp $ */ +/* $OpenBSD: cmds.c,v 1.58 2008/05/13 02:09:38 ray Exp $ */ /* $NetBSD: cmds.c,v 1.27 1997/08/18 10:20:15 lukem Exp $ */ /* @@ -60,7 +60,7 @@ */ #if !defined(lint) && !defined(SMALL) -static const char rcsid[] = "$OpenBSD: cmds.c,v 1.57 2007/09/11 15:47:17 gilles Exp $"; +static const char rcsid[] = "$OpenBSD: cmds.c,v 1.58 2008/05/13 02:09:38 ray Exp $"; #endif /* not lint and not SMALL */ /* @@ -867,24 +867,9 @@ setgate(int argc, char *argv[]) gatemode = 0; else { if (argc == 3) { -#if 0 - char *ep; - long port; - - port = strtol(argv[2], &ep, 10); - if (port < 0 || port > USHRT_MAX || *ep != '\0') { - fprintf(ttyout, - "%s: bad gateport value.\n", - argv[2]); - code = -1; - return; - } - gateport = htons(port); -#else gateport = strdup(argv[2]); if (gateport == NULL) err(1, NULL); -#endif } strlcpy(gsbuf, argv[1], sizeof(gsbuf)); gateserver = gsbuf; diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index 7ebe58a15de..eb8452c4d43 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.47 2007/09/11 15:47:17 gilles Exp $ */ +/* $OpenBSD: util.c,v 1.48 2008/05/13 02:09:38 ray Exp $ */ /* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */ /*- @@ -71,7 +71,7 @@ */ #if !defined(lint) && !defined(SMALL) -static const char rcsid[] = "$OpenBSD: util.c,v 1.47 2007/09/11 15:47:17 gilles Exp $"; +static const char rcsid[] = "$OpenBSD: util.c,v 1.48 2008/05/13 02:09:38 ray Exp $"; #endif /* not lint and not SMALL */ /* @@ -128,26 +128,8 @@ setpeer(int argc, char *argv[]) port = gateport; else port = ftpport; -#if 0 - if (argc > 2) { - char *ep; - long nport; - - nport = strtol(argv[2], &ep, 10); - if (nport < 1 || nport > USHRT_MAX || *ep != '\0') { - fprintf(ttyout, "%s: bad port number '%s'.\n", - argv[1], argv[2]); - fprintf(ttyout, "usage: %s host-name [port]\n", - argv[0]); - code = -1; - return; - } - port = htons((in_port_t)nport); - } -#else if (argc > 2) port = argv[2]; -#endif if (gatemode) { if (gateserver == NULL || *gateserver == '\0') |