mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
363d9c401e
@ -164,15 +164,17 @@ args_parse_flag_argument(struct args_value *values, u_int count, char **cause,
|
|||||||
argument = &values[*i];
|
argument = &values[*i];
|
||||||
if (argument->type != ARGS_STRING) {
|
if (argument->type != ARGS_STRING) {
|
||||||
xasprintf(cause, "-%c argument must be a string", flag);
|
xasprintf(cause, "-%c argument must be a string", flag);
|
||||||
|
args_free_value(new);
|
||||||
|
free(new);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (argument == NULL) {
|
if (argument == NULL) {
|
||||||
|
args_free_value(new);
|
||||||
|
free(new);
|
||||||
if (optional_argument) {
|
if (optional_argument) {
|
||||||
log_debug("%s: -%c (optional)", __func__, flag);
|
log_debug("%s: -%c (optional)", __func__, flag);
|
||||||
args_set(args, flag, NULL, ARGS_ENTRY_OPTIONAL_VALUE);
|
args_set(args, flag, NULL, ARGS_ENTRY_OPTIONAL_VALUE);
|
||||||
args_free_value(new);
|
|
||||||
free(new);
|
|
||||||
return (0); /* either - or end */
|
return (0); /* either - or end */
|
||||||
}
|
}
|
||||||
xasprintf(cause, "-%c expects an argument", flag);
|
xasprintf(cause, "-%c expects an argument", flag);
|
||||||
|
Loading…
Reference in New Issue
Block a user