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 /bin/csh | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'bin/csh')
-rw-r--r-- | bin/csh/printf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/csh/printf.c b/bin/csh/printf.c index b39ff0a7c44..08caba6fa0e 100644 --- a/bin/csh/printf.c +++ b/bin/csh/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.5 1996/12/14 12:17:41 mickey Exp $ */ +/* $OpenBSD: printf.c,v 1.6 1997/01/15 23:40:22 millert Exp $ */ /* $NetBSD: printf.c,v 1.6 1995/03/21 09:03:15 cgd Exp $ */ /* @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93"; #else -static char rcsid[] = "$OpenBSD: printf.c,v 1.5 1996/12/14 12:17:41 mickey Exp $"; +static char rcsid[] = "$OpenBSD: printf.c,v 1.6 1997/01/15 23:40:22 millert Exp $"; #endif #endif /* not lint */ @@ -97,7 +97,7 @@ main(argc, argv) int ch, end, fieldwidth, precision; char convch, nextch, *format, *fmt, *start; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { default: usage(); |