mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
Getopt(3) returns -1, not EOF.
This commit is contained in:
parent
ab27fe4452
commit
0e49c54852
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47440
@ -306,9 +306,9 @@ register char **argv;
|
||||
pat = NULL;
|
||||
|
||||
# ifdef DEBUG
|
||||
while ((ch = getopt(argc, argv, "aDefilm:osw")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "aDefilm:osw")) != -1)
|
||||
#else
|
||||
while ((ch = getopt(argc, argv, "aefilm:osw")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "aefilm:osw")) != -1)
|
||||
#endif /* DEBUG */
|
||||
switch(ch) {
|
||||
case 'a': /* any fortune */
|
||||
|
@ -115,7 +115,7 @@ char **argv;
|
||||
|
||||
srandomdev();
|
||||
|
||||
while ((ch = getopt(argc, argv, "l:w:")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "l:w:")) != -1)
|
||||
switch((char)ch) {
|
||||
#ifdef notdef
|
||||
case 'd':
|
||||
|
Loading…
Reference in New Issue
Block a user