diff options
author | midipix <writeonce@midipix.org> | 2016-11-26 00:58:50 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-26 01:03:04 -0500 |
commit | 1b893b7850571fdc611269039667b04b21802c56 (patch) | |
tree | d9346d546919028cab704e077e60df308ad70106 | |
parent | c004d0ff3b2765afd026b5d7d9e8d8cc386f1dce (diff) | |
download | perk-1b893b7850571fdc611269039667b04b21802c56.tar.bz2 perk-1b893b7850571fdc611269039667b04b21802c56.tar.xz |
argv.h: error code path: remove unneeded if statement (always true).
-rw-r--r-- | src/internal/argv/argv.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index 71cb104..6da2bc1 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); |