summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
Diffstat (limited to 'missing')
-rw-r--r--missing/getopt_long.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/missing/getopt_long.c b/missing/getopt_long.c
index 5018400e..927028ff 100644
--- a/missing/getopt_long.c
+++ b/missing/getopt_long.c
@@ -565,11 +565,11 @@ start:
++optind;
} else { /* takes (optional) argument */
optarg = NULL;
+ if (*place) { /* no white space */
DIAG_OFF_CAST_QUAL
- if (*place) /* no white space */
optarg = (char *)place;
DIAG_ON_CAST_QUAL
- else if (oli[1] != ':') { /* arg not optional */
+ } else if (oli[1] != ':') { /* arg not optional */
if (++optind >= nargc) { /* no arg */
place = EMSG;
if (PRINT_ERROR)