summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-12 00:29:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-12 00:29:35 +0000
commitc1ec1a80077688df9fd02b9229e57d8257501466 (patch)
tree7afa79cb715ee5709549160d001b0c2478f41b2d
parent8591b9347a88daa2818c0c9a72f2e02fae4f45cf (diff)
more getopt() EOF crud; adobriyan@gmail
-rw-r--r--lib/libcurses/tinfo/captoinfo.c4
-rw-r--r--usr.bin/mklocale/yacc.y2
-rw-r--r--usr.sbin/httpd/src/regex/main.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcurses/tinfo/captoinfo.c b/lib/libcurses/tinfo/captoinfo.c
index 8e5df76f523..87e708c1780 100644
--- a/lib/libcurses/tinfo/captoinfo.c
+++ b/lib/libcurses/tinfo/captoinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: captoinfo.c,v 1.12 2003/10/15 23:33:48 tedu Exp $ */
+/* $OpenBSD: captoinfo.c,v 1.13 2006/03/12 00:29:34 deraadt Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
@@ -807,7 +807,7 @@ main(int argc, char *argv[])
{
int c, tc = FALSE;
- while ((c = getopt(argc, argv, "c")) != EOF)
+ while ((c = getopt(argc, argv, "c")) != -1)
switch (c) {
case 'c':
tc = TRUE;
diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y
index 36cf0fc25b5..e3c81d70c5e 100644
--- a/usr.bin/mklocale/yacc.y
+++ b/usr.bin/mklocale/yacc.y
@@ -245,7 +245,7 @@ main(int ac, char *av[])
extern char *optarg;
extern int optind;
- while ((x = getopt(ac, av, "do:")) != EOF) {
+ while ((x = getopt(ac, av, "do:")) != -1) {
switch(x) {
case 'd':
debug = 1;
diff --git a/usr.sbin/httpd/src/regex/main.c b/usr.sbin/httpd/src/regex/main.c
index 1c4364cae9f..b7301566459 100644
--- a/usr.sbin/httpd/src/regex/main.c
+++ b/usr.sbin/httpd/src/regex/main.c
@@ -42,7 +42,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);