mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 17:23:35 +00:00
Test getopt() against -1 instead of EOF.
This commit is contained in:
parent
6dc4364cd6
commit
8a9d51c4f8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105237
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user