summaryrefslogtreecommitdiffhomepage
path: root/src/internal/argv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-03 12:13:47 -0500
committermidipix <writeonce@midipix.org>2016-01-03 12:13:47 -0500
commit89e8cb50b60a3d57157c14774ce1c0912989648d (patch)
tree35173a94f0a74c1d51a05a0d96d6403ef902d990 /src/internal/argv
parent70ddd5167b4744002ac649f95012619c5f5e2721 (diff)
downloadsofort-89e8cb50b60a3d57157c14774ce1c0912989648d.tar.bz2
sofort-89e8cb50b60a3d57157c14774ce1c0912989648d.tar.xz
argv.h: fix ARGV_OPTARG_OPTIONAL code path for long options.
Diffstat (limited to 'src/internal/argv')
-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 d85cb2c..91212e7 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;