From c9fba2a7d7add4ceb903a7b084a96332bba6a856 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Mon, 21 Nov 1988 03:11:02 -0800 Subject: [PATCH] use fgets, not gets SCCS-vsn: usr.sbin/lpr/lpc/lpc.c 5.7 --- usr/src/usr.sbin/lpr/lpc/lpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/src/usr.sbin/lpr/lpc/lpc.c b/usr/src/usr.sbin/lpr/lpc/lpc.c index c1169acdb6..0f8a010e19 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.6 (Berkeley) %G%"; +static char sccsid[] = "@(#)lpc.c 5.7 (Berkeley) %G%"; #endif /* not lint */ /* @@ -105,7 +105,7 @@ cmdscanner(top) printf("lpc> "); fflush(stdout); } - if (gets(cmdline) == 0) + if (fgets(cmdline, sizeof(cmdline), stdin) == 0) quit(); if (cmdline[0] == 0) break; -- 2.20.1