From 441f3c9dace4543ba229039711013ecfc24701a0 Mon Sep 17 00:00:00 2001 From: jkh Date: Sun, 1 Mar 1998 05:10:28 +0000 Subject: Wargh! Who went and changed all the getopt() comparisons from -1 to EOF? The getopt(3) manpage clearly states that the return value is *-1*, not EOF! Besides, getopt(3) isn't reading from a file. :) Noticed-while: merging to 2.2 (where this is correct). --- games/random/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'games/random') diff --git a/games/random/random.c b/games/random/random.c index 076990b..c3ba51c 100644 --- a/games/random/random.c +++ b/games/random/random.c @@ -67,7 +67,7 @@ main(argc, argv) char *ep; random_exit = unbuffer_output = 0; - while ((ch = getopt(argc, argv, "er")) != EOF) + while ((ch = getopt(argc, argv, "er")) != -1) switch (ch) { case 'e': random_exit = 1; -- cgit v1.1