diff options
author | charnier <charnier@FreeBSD.org> | 2002-10-16 12:56:22 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2002-10-16 12:56:22 +0000 |
commit | 39a491d1413e54bbb32a15f89d24dab9edbd204a (patch) | |
tree | 0857bc3a8e17ad4ea669d0117cc1e5061603c91c /usr.bin | |
parent | 591fe004dcc328f799acea8446a22859df70e4fe (diff) | |
download | FreeBSD-src-39a491d1413e54bbb32a15f89d24dab9edbd204a.zip FreeBSD-src-39a491d1413e54bbb32a15f89d24dab9edbd204a.tar.gz |
Test getopt() against -1 instead of EOF.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/colldef/parse.y | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y index e362bb0..c35ea7e 100644 --- a/usr.bin/colldef/parse.y +++ b/usr.bin/colldef/parse.y @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include <stdarg.h> #include <stdio.h> #include <string.h> -#include <stdlib.h> #include <unistd.h> #include <sysexits.h> #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) { |