From: Thomas Ferrin Date: Wed, 21 Mar 1990 03:09:55 +0000 (-0800) Subject: prevent stupid Ambiquous Command error on null input line X-Git-Tag: BSD-4_3_Reno-Snapshot-Development~4074 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/c0413642e366472baed8535e6093f70ce073f691 prevent stupid Ambiquous Command error on null input line SCCS-vsn: usr.sbin/lpr/lpc/lpc.c 5.9 --- diff --git a/usr/src/usr.sbin/lpr/lpc/lpc.c b/usr/src/usr.sbin/lpr/lpc/lpc.c index 47f86211e3..47b84e93a8 100644 --- a/usr/src/usr.sbin/lpr/lpc/lpc.c +++ b/usr/src/usr.sbin/lpr/lpc/lpc.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)lpc.c 5.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)lpc.c 5.9 (Berkeley) %G%"; #endif /* not lint */ /* @@ -107,7 +107,7 @@ cmdscanner(top) } if (fgets(cmdline, sizeof(cmdline), stdin) == 0) quit(); - if (cmdline[0] == 0) + if (cmdline[0] == 0 || cmdline[0] == '\n') break; makeargv(); c = getcmd(margv[0]);