From 054f35c2222ef251bc2877814cf7bf5ff6038166 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 28 Mar 1997 15:24:41 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- bin/cat/cat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/cat') diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 101653d..175f2f8 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: cat.c,v 1.8 1997/02/22 14:01:26 peter Exp $ */ #ifndef lint @@ -78,7 +78,7 @@ main(argc, argv) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "benstuv")) != EOF) + while ((ch = getopt(argc, argv, "benstuv")) != -1) switch (ch) { case 'b': bflag = nflag = 1; /* -b implies -n */ -- cgit v1.1