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 /sbin/dmesg/dmesg.c | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'sbin/dmesg/dmesg.c')
-rw-r--r-- | sbin/dmesg/dmesg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c index 1782a131b08..9e63bd76a53 100644 --- a/sbin/dmesg/dmesg.c +++ b/sbin/dmesg/dmesg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dmesg.c,v 1.3 1996/12/22 03:00:49 deraadt Exp $ */ +/* $OpenBSD: dmesg.c,v 1.4 1997/01/15 23:41:10 millert Exp $ */ /* $NetBSD: dmesg.c,v 1.8 1995/03/18 14:54:49 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)dmesg.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: dmesg.c,v 1.3 1996/12/22 03:00:49 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dmesg.c,v 1.4 1997/01/15 23:41:10 millert Exp $"; #endif #endif /* not lint */ @@ -86,7 +86,7 @@ main(argc, argv) char buf[5]; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "M:N:")) != EOF) + while ((ch = getopt(argc, argv, "M:N:")) != -1) switch(ch) { case 'M': memf = optarg; |