diff options
author | Miles Bader <miles@gnu.org> | 1996-05-23 14:55:12 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-05-23 14:55:12 +0000 |
commit | d1952964c6a2068347434f2581e2cefa325ed72c (patch) | |
tree | d4642f5d9098b9fb4d91d7889028b870af49329b /libstore | |
parent | 7deb372b676134d7c3b61433c4c275a11c0b21de (diff) |
(parse_opt): Honor ARGP_NO_ERRS.
Diffstat (limited to 'libstore')
-rw-r--r-- | libstore/argp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libstore/argp.c b/libstore/argp.c index 71399474..c98774a8 100644 --- a/libstore/argp.c +++ b/libstore/argp.c @@ -139,8 +139,11 @@ parse_opt (int opt, char *arg, struct argp_state *state) if (err) { /* Use error instead of ERR because it's not a parsing error. */ - int exit_status = (state->flags & ARGP_NO_EXIT) ? 0 : 1; - error (exit_status, err, "%s", arg); + if (! (state->flags & ARGP_NO_ERRS)) + { + int exit_status = (state->flags & ARGP_NO_EXIT) ? 0 : 1; + error (exit_status, err, "%s", arg); + } return err; } else |