From dab371bd24cd2ee34c5bae2f6c479e8f0c8b1784 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 26 Nov 2016 00:58:50 -0500 Subject: argv.h: error code path: remove unneeded if statement (always true). --- src/internal/argv/argv.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/internal') diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index 7604c45..848e0af 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -692,8 +692,7 @@ static struct argv_meta * argv_get( argv_scan(argv,options,&ctx,0); if (ctx.errcode != ARGV_ERROR_OK) { - if (!ctx.program) - ctx.program = argv_program_name(argv[0]); + ctx.program = argv_program_name(argv[0]); if (ctx.flags & ARGV_VERBOSITY_ERRORS) argv_show_error(&ctx); @@ -708,9 +707,7 @@ static struct argv_meta * argv_get( argv_scan(meta->argv,options,&ctx,meta); if (ctx.errcode != ARGV_ERROR_OK) { - if (!ctx.program) - ctx.program = argv[0]; - + ctx.program = argv[0]; ctx.errcode = ARGV_ERROR_INTERNAL; argv_show_error(&ctx); argv_free(meta); -- cgit v1.2.3