summaryrefslogtreecommitdiffstats
path: root/cmd-queue.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-20 18:59:53 +0000
committernicm <nicm>2021-08-20 18:59:53 +0000
commit90dd474c3ea8bf10bde6ee15eaaf9f3af3fb46f6 (patch)
treed7a208a65eaa5d17da7f7b764cfcf94ebfe01366 /cmd-queue.c
parent6cbc83c6a64f272575aac1ee32cc0a0b1cb75c7b (diff)
Expose args_value struct (will be needed soon) and add some missing frees.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r--cmd-queue.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index 6dd5f9dd..198a2a43 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -352,8 +352,8 @@ cmdq_insert_hook(struct session *s, struct cmdq_item *item,
struct cmdq_state *state = item->state;
struct cmd *cmd = item->cmd;
struct args *args = cmd_get_args(cmd);
- struct args_entry *entryp;
- struct args_value *valuep;
+ struct args_entry *ae;
+ struct args_value *av;
struct options *oo;
va_list ap;
char *name, tmp[32], flag, *arguments;
@@ -398,7 +398,7 @@ cmdq_insert_hook(struct session *s, struct cmdq_item *item,
xsnprintf(tmp, sizeof tmp, "hook_argument_%d", i);
cmdq_add_format(new_state, tmp, "%s", args->argv[i]);
}
- flag = args_first(args, &entryp);
+ flag = args_first(args, &ae);
while (flag != 0) {
value = args_get(args, flag);
if (value == NULL) {
@@ -410,15 +410,15 @@ cmdq_insert_hook(struct session *s, struct cmdq_item *item,
}
i = 0;
- value = args_first_value(args, flag, &valuep);
- while (value != NULL) {
+ av = args_first_value(args, flag);
+ while (av != NULL) {
xsnprintf(tmp, sizeof tmp, "hook_flag_%c_%d", flag, i);
- cmdq_add_format(new_state, tmp, "%s", value);
+ cmdq_add_format(new_state, tmp, "%s", av->value);
i++;
- value = args_next_value(&valuep);
+ av = args_next_value(av);
}
- flag = args_next(&entryp);
+ flag = args_next(&ae);
}
a = options_array_first(o);