mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Test getopt() against -1 instead of EOF.
This commit is contained in:
parent
6dc4364cd6
commit
8a9d51c4f8
1 changed files with 2 additions and 3 deletions
|
|
@ -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 a new issue