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/netstat | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 10a31faaa2f..349be1474b2 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.5 1996/12/22 03:25:58 tholo Exp $ */ +/* $OpenBSD: main.c,v 1.6 1997/01/15 23:42:55 millert Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ char copyright[] = #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else -static char *rcsid = "$OpenBSD: main.c,v 1.5 1996/12/22 03:25:58 tholo Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.6 1997/01/15 23:42:55 millert Exp $"; #endif #endif /* not lint */ @@ -226,7 +226,7 @@ main(argc, argv) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "Aadf:ghI:iM:mN:np:rstuw:")) != EOF) + while ((ch = getopt(argc, argv, "Aadf:ghI:iM:mN:np:rstuw:")) != -1) switch(ch) { case 'A': Aflag = 1; |