From 3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c Mon Sep 17 00:00:00 2001 From: millert <> Date: Wed, 15 Jan 1997 23:43:43 +0000 Subject: getopt(3) returns -1 when out of args, not EOF, whee! --- src/regress/lib/libc/regex/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/regress/lib/libc/regex/main.c') diff --git a/src/regress/lib/libc/regex/main.c b/src/regress/lib/libc/regex/main.c index add5e8be10..6e63ffc235 100644 --- a/src/regress/lib/libc/regex/main.c +++ b/src/regress/lib/libc/regex/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.2 1996/12/21 22:23:42 millert Exp $ */ +/* $OpenBSD: main.c,v 1.3 1997/01/15 23:41:07 millert Exp $ */ /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ #include @@ -47,7 +47,7 @@ char *argv[]; progname = argv[0]; - while ((c = getopt(argc, argv, "c:e:S:E:x")) != EOF) + while ((c = getopt(argc, argv, "c:e:S:E:x")) != -1) switch (c) { case 'c': /* compile options */ copts = options('c', optarg); -- cgit v1.2.3-55-g6feb