summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-26 00:58:50 -0500
committermidipix <writeonce@midipix.org>2016-12-18 09:04:48 -0500
commitbd297b8fab8fd4fcb0c7cad10d819652ff0fbd2f (patch)
tree69dab8202f69662d04d54a4c6d13757ff493f100 /src/internal
parent2902772ac2be3b74f2825d1982b2a573add60f12 (diff)
downloadapimagic-bd297b8fab8fd4fcb0c7cad10d819652ff0fbd2f.tar.bz2
apimagic-bd297b8fab8fd4fcb0c7cad10d819652ff0fbd2f.tar.xz
argv.h: error code path: remove unneeded if statement (always true).
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/argv/argv.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index df2e264..4bd1480 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);