Getopt(3) returns -1, not EOF.

This commit is contained in:
imp 1999-05-23 23:17:28 +00:00
parent 6657154218
commit 52fa104235
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':