From 8a9d51c4f880ee698565e5551c1bc8d9f4f8a852 Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Wed, 16 Oct 2002 12:56:22 +0000 Subject: [PATCH] Test getopt() against -1 instead of EOF. --- usr.bin/colldef/parse.y | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y index e362bb027338..c35ea7ee2c75 100644 --- a/usr.bin/colldef/parse.y +++ b/usr.bin/colldef/parse.y @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include "collate.h" @@ -297,9 +296,9 @@ main(int ac, char **av) int ch; #ifdef COLLATE_DEBUG - while((ch = getopt(ac, av, ":do:I:")) != EOF) { + while((ch = getopt(ac, av, ":do:I:")) != -1) { #else - while((ch = getopt(ac, av, ":o:I:")) != EOF) { + while((ch = getopt(ac, av, ":o:I:")) != -1) { #endif switch (ch) {