1
0
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:
Warner Losh 1999-05-23 23:17:28 +00:00
parent ab27fe4452
commit 0e49c54852
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47440
2 changed files with 3 additions and 3 deletions

View File

@ -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 */

View File

@ -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':