summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/main.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-01-29 22:21:33 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-01-29 22:21:33 +0000
commiteaab01596434d7f6b53a768ae06297a14ed97a35 (patch)
tree9a3b34c5d4e68ad12ef6f352a8cc993d3fe95927 /usr.bin/ftp/main.c
parentb693436733a3c12253d11ac5378ab7844329d9f3 (diff)
Break out of infinite loop ftp://home.host/som/path mode if host
does not exist. Also, use herror, not perror if gethostbynam() fails.
Diffstat (limited to 'usr.bin/ftp/main.c')
-rw-r--r--usr.bin/ftp/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index 44cd8e43611..a10adcc5303 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.15 1997/01/25 21:42:33 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.16 1997/01/29 22:21:32 millert Exp $ */
/*
* Copyright (c) 1985, 1989, 1993, 1994
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.15 1997/01/25 21:42:33 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.16 1997/01/29 22:21:32 millert Exp $";
#endif
#endif /* not lint */
@@ -213,6 +213,8 @@ main(argc, argv)
if (!connected) {
printf("failed to connect to %s\n", host);
ret = 1;
+ argc--;
+ argv++;
goto bail;
}
*argv = p + 1;