From 633b07b1cfe970da2ebf009fd0ffccb1b0cf03bd Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 25 Nov 1997 08:10:35 +0000 Subject: prompting error; pr#352, blair@nac.net --- usr.bin/ftp/util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'usr.bin/ftp/util.c') diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index 6d63b5ff6f6..a6659994a9a 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.15 1997/09/15 04:57:54 millert Exp $ */ +/* $OpenBSD: util.c,v 1.16 1997/11/25 08:10:34 deraadt Exp $ */ /* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */ /* @@ -35,7 +35,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: util.c,v 1.15 1997/09/15 04:57:54 millert Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.16 1997/11/25 08:10:34 deraadt Exp $"; #endif /* not lint */ /* @@ -444,6 +444,7 @@ confirm(cmd, file) if (!interactive || confirmrest) return (1); +top: fprintf(ttyout, "%s %s? ", cmd, file); (void)fflush(ttyout); if (fgets(line, sizeof(line), stdin) == NULL) @@ -464,9 +465,7 @@ confirm(cmd, file) break; default: fprintf(ttyout, "n, y, p, a, are the only acceptable commands!\n"); - fprintf(ttyout, "%s %s? ", cmd, file); - fgets(line, sizeof(line), stdin); - confirm(cmd, file); + goto top; break; } return (1); -- cgit v1.2.3