From eed16ccebf8fd1fdf9709affbd5c831f6957b8ae Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 21 Nov 2014 17:04:42 -0500 Subject: [PATCH] Distinguish between ARGPARSE_AMBIGUOUS_{OPTION,COMMAND} * common/argparse.c (initialize): Use correct value. -- This avoids a dead path in the argparse code. It's not clear that this is needed, however, since ARGPARSE_AMBIGUOUS_COMMAND is never actually used in the code. Another approach would be to trim out ARGPARSE_AMBIGUOUS_COMMAND entirely. --- common/argparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/argparse.c b/common/argparse.c index 0a36a9e53..169e23431 100644 --- a/common/argparse.c +++ b/common/argparse.c @@ -290,7 +290,7 @@ initialize( ARGPARSE_ARGS *arg, const char *filename, unsigned *lineno ) jnlib_log_error (_("invalid command \"%.50s\"\n"), s); else if ( arg->r_opt == ARGPARSE_AMBIGUOUS_OPTION ) jnlib_log_error (_("option \"%.50s\" is ambiguous\n"), s); - else if ( arg->r_opt == ARGPARSE_AMBIGUOUS_OPTION ) + else if ( arg->r_opt == ARGPARSE_AMBIGUOUS_COMMAND ) jnlib_log_error (_("command \"%.50s\" is ambiguous\n"),s ); else if ( arg->r_opt == ARGPARSE_OUT_OF_CORE ) jnlib_log_error ("%s\n", _("out of core\n"));