From 686e2181bfc74ef9ae243ba81d70914ae5b1cb4f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 11 May 1996 04:14:27 +0000 Subject: (argp_parse): Turn any EBADKEY that makes it to the end back into EINVAL. --- libshouldbeinlibc/argp-parse.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libshouldbeinlibc/argp-parse.c') 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; } -- cgit v1.2.3