diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
commit | 552d265b6ced1e56d31f20f16a7fe9ae818d568b (patch) | |
tree | 219a59b7e7a5ef53ddfc66cdc38e73e3f79258c8 /usr.bin/systat | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index d35d48690b0..409a9a2900d 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.8 1996/12/22 03:26:07 tholo Exp $ */ +/* $OpenBSD: main.c,v 1.9 1997/01/15 23:43:17 millert Exp $ */ /* $NetBSD: main.c,v 1.8 1996/05/10 23:16:36 thorpej Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: main.c,v 1.8 1996/12/22 03:26:07 tholo Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.9 1997/01/15 23:43:17 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -97,7 +97,7 @@ main(argc, argv) int ch; char errbuf[_POSIX2_LINE_MAX]; - while ((ch = getopt(argc, argv, "M:N:w:")) != EOF) + while ((ch = getopt(argc, argv, "M:N:w:")) != -1) switch(ch) { case 'M': memf = optarg; |