summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-05-23 23:17:28 +0000
committerimp <imp@FreeBSD.org>1999-05-23 23:17:28 +0000
commit52fa104235ad06848e8c6f1938df19bcc7482f75 (patch)
tree49ca019319a0b603310a93aef2cec718e88fb0ae /games
parent66571542185a9035ec34905eec6e4bb6b2dc9a13 (diff)
downloadFreeBSD-src-52fa104235ad06848e8c6f1938df19bcc7482f75.zip
FreeBSD-src-52fa104235ad06848e8c6f1938df19bcc7482f75.tar.gz
Getopt(3) returns -1, not EOF.
Diffstat (limited to 'games')
-rw-r--r--games/fortune/fortune/fortune.c4
-rw-r--r--games/snake/snake/snake.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index 9d7671c..44910ca 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -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 */
diff --git a/games/snake/snake/snake.c b/games/snake/snake/snake.c
index 0b2e349..34dd265 100644
--- a/games/snake/snake/snake.c
+++ b/games/snake/snake/snake.c
@@ -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':
OpenPOWER on IntegriCloud