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-set-buffer.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-set-buffer.c')
-rw-r--r-- | cmd-set-buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-set-buffer.c b/cmd-set-buffer.c index 94d8cd52..3005e62d 100644 --- a/cmd-set-buffer.c +++ b/cmd-set-buffer.c @@ -94,11 +94,11 @@ cmd_set_buffer_exec(struct cmd *self, struct cmdq_item *item) return (CMD_RETURN_NORMAL); } - if (args->argc != 1) { + if (args_count(args) != 1) { cmdq_error(item, "no data specified"); return (CMD_RETURN_ERROR); } - if ((newsize = strlen(args->argv[0])) == 0) + if ((newsize = strlen(args_string(args, 0))) == 0) return (CMD_RETURN_NORMAL); bufsize = 0; @@ -111,7 +111,7 @@ cmd_set_buffer_exec(struct cmd *self, struct cmdq_item *item) } bufdata = xrealloc(bufdata, bufsize + newsize); - memcpy(bufdata + bufsize, args->argv[0], newsize); + memcpy(bufdata + bufsize, args_string(args, 0), newsize); bufsize += newsize; if (paste_set(bufdata, bufsize, bufname, &cause) != 0) { |