aboutsummaryrefslogtreecommitdiff
path: root/cmd-parse.y
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-08-23 16:06:46 +0100
committerThomas Adam <thomas@xteddy.org>2021-08-23 16:06:46 +0100
commit95a374d7d20dde938563a9f92c8ffc1e25bd4050 (patch)
tree596cfdc4aa9c9d7a0f04cd1c8b541e86ede90eef /cmd-parse.y
parent1dec1ca146882572e261f2f2f55d9060c06a0212 (diff)
parent210e71edf36198e3f22525e7f548a71a5681d25c (diff)
downloadrtmux-95a374d7d20dde938563a9f92c8ffc1e25bd4050.tar.gz
rtmux-95a374d7d20dde938563a9f92c8ffc1e25bd4050.tar.bz2
rtmux-95a374d7d20dde938563a9f92c8ffc1e25bd4050.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'cmd-parse.y')
-rw-r--r--cmd-parse.y9
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd-parse.y b/cmd-parse.y
index c27d530e..a08c5819 100644
--- a/cmd-parse.y
+++ b/cmd-parse.y
@@ -426,7 +426,7 @@ command : assignment
arg = xcalloc(1, sizeof *arg);
arg->type = CMD_PARSE_STRING;
- arg->string = xstrdup($2);
+ arg->string = $2;
TAILQ_INSERT_HEAD(&$$->arguments, arg, entry);
}
| optional_assignment TOKEN arguments
@@ -443,7 +443,7 @@ command : assignment
arg = xcalloc(1, sizeof *arg);
arg->type = CMD_PARSE_STRING;
- arg->string = xstrdup($2);
+ arg->string = $2;
TAILQ_INSERT_HEAD(&$$->arguments, arg, entry);
}
@@ -543,13 +543,13 @@ argument : TOKEN
{
$$ = xcalloc(1, sizeof *$$);
$$->type = CMD_PARSE_STRING;
- $$->string = xstrdup($1);
+ $$->string = $1;
}
| EQUALS
{
$$ = xcalloc(1, sizeof *$$);
$$->type = CMD_PARSE_STRING;
- $$->string = xstrdup($1);
+ $$->string = $1;
}
| '{' argument_statements
{
@@ -817,7 +817,6 @@ cmd_parse_build_command(struct cmd_parse_command *cmd,
goto out;
values[count].type = ARGS_COMMANDS;
values[count].cmdlist = pr->cmdlist;
- values[count].cmdlist->references++;
break;
}
count++;