From 552d265b6ced1e56d31f20f16a7fe9ae818d568b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 15 Jan 1997 23:44:39 +0000 Subject: getopt(3) returns -1 when out of args, not EOF, whee! --- sbin/bim/bim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/bim') diff --git a/sbin/bim/bim.c b/sbin/bim/bim.c index 5c8daecbc75..bbb52f522ed 100644 --- a/sbin/bim/bim.c +++ b/sbin/bim/bim.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bim.c,v 1.2 1996/06/23 14:29:56 deraadt Exp $ */ +/* $OpenBSD: bim.c,v 1.3 1997/01/15 23:41:09 millert Exp $ */ /* $NetBSD: bim.c,v 1.4 1995/09/28 07:08:49 phil Exp $ */ /* @@ -618,7 +618,7 @@ char *argv[]; cmdscnt = 0; opterr = TRUE; fname = DEFAULT_DEVICE; - while ((optchar = getopt (argc, argv, "c:")) != EOF) + while ((optchar = getopt (argc, argv, "c:")) != -1) switch (optchar) { case 'c': if (cmdscnt == MAXARGCMDS) usage(); argcmds[cmdscnt++] = optarg; -- cgit v1.2.3