diff options
author | jkh <jkh@FreeBSD.org> | 1998-03-01 05:10:28 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-03-01 05:10:28 +0000 |
commit | 441f3c9dace4543ba229039711013ecfc24701a0 (patch) | |
tree | 11768c61275978338ad528091d06eb1cb3dc7302 /games/piano | |
parent | 69e5a1e9f571b8af39e0b507e63b81be43f49634 (diff) | |
download | FreeBSD-src-441f3c9dace4543ba229039711013ecfc24701a0.zip FreeBSD-src-441f3c9dace4543ba229039711013ecfc24701a0.tar.gz |
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).
Diffstat (limited to 'games/piano')
-rw-r--r-- | games/piano/piano.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/games/piano/piano.c b/games/piano/piano.c index 3c15495..8e16b3a 100644 --- a/games/piano/piano.c +++ b/games/piano/piano.c @@ -1,7 +1,7 @@ /* * piano.c - a piano emulator */ -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: piano.c,v 1.4 1997/02/22 14:46:57 peter Exp $"; #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -139,7 +139,7 @@ main(int argc, char *argv[]) extern int optind, opterr; int ch, ex, show_usage = 0; myname = argv[0]; - while ((ch = getopt(argc, argv, "-vi:")) != EOF) { + while ((ch = getopt(argc, argv, "-vi:")) != -1) { switch (ch) { default: case 'V': |