summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}