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! --- lib/libc/time/zic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/time/zic.c b/lib/libc/time/zic.c index 98e063e479f..d50d1144b08 100644 --- a/lib/libc/time/zic.c +++ b/lib/libc/time/zic.c @@ -2,7 +2,7 @@ #if 0 static char elsieid[] = "@(#)zic.c 7.80"; #else -static char rcsid[] = "$OpenBSD: zic.c,v 1.5 1997/01/14 03:16:58 millert Exp $"; +static char rcsid[] = "$OpenBSD: zic.c,v 1.6 1997/01/15 23:40:55 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -478,7 +478,7 @@ char * argv[]; (void) textdomain(TZ_DOMAIN); #endif /* HAVE_GETTEXT - 0 */ progname = argv[0]; - while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF) + while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != -1) switch (c) { default: usage(); -- cgit v1.2.3