From 3a3c1759297d3621663571dc85d2fb5d1d53b3b1 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 5 Oct 2016 10:24:59 +0200 Subject: 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. --- utils/msgids.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'utils') 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': -- cgit v1.2.3