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/reboot | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'sbin/reboot')
-rw-r--r-- | sbin/reboot/reboot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index caf185528f1..1b2fe05b1b3 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reboot.c,v 1.4 1996/07/22 09:20:59 deraadt Exp $ */ +/* $OpenBSD: reboot.c,v 1.5 1997/01/15 23:41:38 millert Exp $ */ /* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: reboot.c,v 1.4 1996/07/22 09:20:59 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: reboot.c,v 1.5 1997/01/15 23:41:38 millert Exp $"; #endif #endif /* not lint */ @@ -87,7 +87,7 @@ main(argc, argv) } else howto = 0; lflag = nflag = qflag = 0; - while ((ch = getopt(argc, argv, "lnqd")) != EOF) + while ((ch = getopt(argc, argv, "lnqd")) != -1) switch(ch) { case 'l': /* Undocumented; used by shutdown. */ lflag = 1; |