diff options
author | nicm <nicm> | 2021-08-20 19:50:16 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-20 19:50:16 +0000 |
commit | 5f32b7d9613e9ef3f8198302379a42630323da6a (patch) | |
tree | 0a0b488496625e9da5cbc02c5a1271634568ecc3 /cmd-queue.c | |
parent | de94a344f61b0e4ef6459c11621be3c3d1683c9e (diff) | |
download | rtmux-5f32b7d9613e9ef3f8198302379a42630323da6a.tar.gz rtmux-5f32b7d9613e9ef3f8198302379a42630323da6a.tar.bz2 rtmux-5f32b7d9613e9ef3f8198302379a42630323da6a.zip |
Hide struct args behind a couple of accessor functions.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 198a2a43..687d037f 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -357,7 +357,7 @@ cmdq_insert_hook(struct session *s, struct cmdq_item *item, struct options *oo; va_list ap; char *name, tmp[32], flag, *arguments; - int i; + u_int i; const char *value; struct cmdq_item *new_item; struct cmdq_state *new_state; @@ -394,9 +394,9 @@ cmdq_insert_hook(struct session *s, struct cmdq_item *item, cmdq_add_format(new_state, "hook_arguments", "%s", arguments); free(arguments); - for (i = 0; i < args->argc; i++) { + for (i = 0; i < args_count(args); i++) { xsnprintf(tmp, sizeof tmp, "hook_argument_%d", i); - cmdq_add_format(new_state, tmp, "%s", args->argv[i]); + cmdq_add_format(new_state, tmp, "%s", args_string(args, i)); } flag = args_first(args, &ae); while (flag != 0) { |