diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-03-25 16:54:18 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-03-25 16:54:18 +0000 |
commit | b3ec4210d69766f5f31f3800f470e51633f41b8f (patch) | |
tree | 95f9b0b416302a7807019fcdd1680d5da42496e1 /usr.bin/apply/apply.c | |
parent | c3ee6accf7f4f65c992c9f1b324bcf28dfc65156 (diff) |
Use the return value from getopt() instead of optopt in non-error
cases since optopt is not set in these cases, and it is not required
by POSIX that it should be.
ok millert otto
Diffstat (limited to 'usr.bin/apply/apply.c')
-rw-r--r-- | usr.bin/apply/apply.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c index dc7da469a84..72659a5f1de 100644 --- a/usr.bin/apply/apply.c +++ b/usr.bin/apply/apply.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apply.c,v 1.19 2005/02/24 12:56:15 jsg Exp $ */ +/* $OpenBSD: apply.c,v 1.20 2005/03/25 16:54:17 jaredy Exp $ */ /* $NetBSD: apply.c,v 1.3 1995/03/25 03:38:23 glass Exp $ */ /*- @@ -37,7 +37,7 @@ #if 0 static const char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94"; #else -static const char rcsid[] = "$OpenBSD: apply.c,v 1.19 2005/02/24 12:56:15 jsg Exp $"; +static const char rcsid[] = "$OpenBSD: apply.c,v 1.20 2005/03/25 16:54:17 jaredy Exp $"; #endif #endif /* not lint */ @@ -81,7 +81,7 @@ main(int argc, char *argv[]) if (nargs != -1) errx(1, "only one -# argument may be specified."); - nargs = optopt - '0'; + nargs = ch - '0'; break; default: usage(); |