Hide struct args behind a couple of accessor functions.

This commit is contained in:
nicm
2021-08-20 19:50:16 +00:00
parent de94a344f6
commit 5f32b7d961
41 changed files with 355 additions and 306 deletions

View File

@ -121,11 +121,11 @@ static enum cmd_retval
cmd_wait_for_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = cmd_get_args(self);
const char *name = args->argv[0];
struct wait_channel *wc, wc0;
const char *name = args_string(args, 0);
struct wait_channel *wc, find;
wc0.name = name;
wc = RB_FIND(wait_channels, &wait_channels, &wc0);
find.name = name;
wc = RB_FIND(wait_channels, &wait_channels, &find);
if (args_has(args, 'S'))
return (cmd_wait_for_signal(item, name, wc));