Test getopt() against -1 instead of EOF.

This commit is contained in:
Philippe Charnier 2002-10-16 12:56:22 +00:00
parent 6dc4364cd6
commit 8a9d51c4f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105237

View file

@ -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)
{