summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/argp-parse.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-05-11 04:14:27 +0000
committerMiles Bader <miles@gnu.org>1996-05-11 04:14:27 +0000
commit686e2181bfc74ef9ae243ba81d70914ae5b1cb4f (patch)
tree074b3925349f479560b2714378182fb748bf440c /libshouldbeinlibc/argp-parse.c
parent920233a64a93a1e8385c12da367de6aa17c0bcba (diff)
(argp_parse): Turn any EBADKEY that makes it to the end back into EINVAL.
Diffstat (limited to 'libshouldbeinlibc/argp-parse.c')
-rw-r--r--libshouldbeinlibc/argp-parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index 7f9f30b8..8ec7f223 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/argp-parse.c
@@ -643,5 +643,8 @@ argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
err = 0; /* Some parser didn't understand. */
}
+ if (err == EBADKEY)
+ err = EINVAL;
+
return err;
}