diff options
author | millert <> | 1997-01-15 23:43:43 +0000 |
---|---|---|
committer | millert <> | 1997-01-15 23:43:43 +0000 |
commit | 3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c (patch) | |
tree | 2f4eb6cb395038759776aa9f3a547726e402ce80 /src/regress/lib | |
parent | f8953640b655af43a4ee7a6448038e8c3fe37076 (diff) | |
download | openbsd-3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c.tar.gz openbsd-3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c.tar.bz2 openbsd-3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c.zip |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libc/db/dbtest.c | 2 | ||||
-rw-r--r-- | src/regress/lib/libc/regex/main.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/regress/lib/libc/db/dbtest.c b/src/regress/lib/libc/db/dbtest.c index 65587a6fcb..ac9eaa48fd 100644 --- a/src/regress/lib/libc/db/dbtest.c +++ b/src/regress/lib/libc/db/dbtest.c | |||
@@ -107,7 +107,7 @@ main(argc, argv) | |||
107 | fname = NULL; | 107 | fname = NULL; |
108 | oflags = O_CREAT | O_RDWR; | 108 | oflags = O_CREAT | O_RDWR; |
109 | sflag = 0; | 109 | sflag = 0; |
110 | while ((ch = getopt(argc, argv, "f:i:lo:s")) != EOF) | 110 | while ((ch = getopt(argc, argv, "f:i:lo:s")) != -1) |
111 | switch (ch) { | 111 | switch (ch) { |
112 | case 'f': | 112 | case 'f': |
113 | fname = optarg; | 113 | fname = optarg; |
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 @@ | |||
1 | /* $OpenBSD: main.c,v 1.2 1996/12/21 22:23:42 millert Exp $ */ | 1 | /* $OpenBSD: main.c,v 1.3 1997/01/15 23:41:07 millert Exp $ */ |
2 | /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ | 2 | /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ |
3 | 3 | ||
4 | #include <stdio.h> | 4 | #include <stdio.h> |
@@ -47,7 +47,7 @@ char *argv[]; | |||
47 | 47 | ||
48 | progname = argv[0]; | 48 | progname = argv[0]; |
49 | 49 | ||
50 | while ((c = getopt(argc, argv, "c:e:S:E:x")) != EOF) | 50 | while ((c = getopt(argc, argv, "c:e:S:E:x")) != -1) |
51 | switch (c) { | 51 | switch (c) { |
52 | case 'c': /* compile options */ | 52 | case 'c': /* compile options */ |
53 | copts = options('c', optarg); | 53 | copts = options('c', optarg); |