diff options
author | Justus Winter <justus@gnupg.org> | 2016-10-05 10:24:59 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-10-05 10:24:59 +0200 |
commit | 3a3c1759297d3621663571dc85d2fb5d1d53b3b1 (patch) | |
tree | 3880da46eb102bede70cdfc023f58ecd3444ebe4 /utils/msgids.c | |
parent | e6bffe8d286d49311c0d34acab4b9da867e0dfe8 (diff) | |
download | hurd-3a3c1759297d3621663571dc85d2fb5d1d53b3b1.tar.gz hurd-3a3c1759297d3621663571dc85d2fb5d1d53b3b1.tar.bz2 hurd-3a3c1759297d3621663571dc85d2fb5d1d53b3b1.zip |
Avoid fatal error handling in option parsers.
* trans/crash.c (parse_opt): Avoid 'error' in favor of the appropriate
argp error reporting mechanism.
* trans/remap.c (parse_opt): Likewise.
* utils/msgids.c (parse_opt): Likewise.
Diffstat (limited to 'utils/msgids.c')
-rw-r--r-- | utils/msgids.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/msgids.c b/utils/msgids.c index 4bc08ded..d17f1316 100644 --- a/utils/msgids.c +++ b/utils/msgids.c @@ -200,7 +200,10 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) case 'i': if (argz_add (&msgids_files_argz, &msgids_files_argz_len, arg) != 0) - error (1, errno, "argz_add"); + { + argp_failure (state, 1, errno, "argz_add"); + return errno; + } break; case 'I': |