summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-03 12:11:23 -0500
committermidipix <writeonce@midipix.org>2016-11-11 00:22:33 -0500
commitb0752522c957371db68610b404af4ed1f5244cc8 (patch)
treeea248057f4edbb1b79db62c9cc54eda28125d3a6
parent0e1e134e4faa93f452571014913695a3e0877e21 (diff)
downloadmdso-b0752522c957371db68610b404af4ed1f5244cc8.tar.bz2
mdso-b0752522c957371db68610b404af4ed1f5244cc8.tar.xz
argv.h: fix ARGV_OPTARG_OPTIONAL code path for long options.
-rw-r--r--src/internal/argv/argv.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 39a7d7e..853c151 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -391,16 +391,7 @@ static void argv_scan(
fval = true;
} else {
/* ARGV_OPTARG_OPTIONAL */
- if (!val[0] && !*parg)
- fval = false;
- else if (*parg && is_short_option(*parg))
- fval = false;
- else if (*parg && is_long_option(*parg))
- fval = false;
- else if (*parg && is_last_option(*parg))
- fval = false;
- else
- fval = *parg;
+ fval = val[0];
}
} else
ferror = ARGV_ERROR_LONG_OPTION;