aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/worker.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/worker.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/worker.c b/src/worker.c
index d085000..2771ff2 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -118,17 +118,19 @@ free_output:
return ret;
}
-static struct cmd_desc cmds[] = {
+static struct cmd_desc commands[] = {
{CMD_RUN, msg_run_handler},
};
+static const size_t numof_commands = sizeof(commands) / sizeof(commands[0]);
+
int worker_main(UNUSED struct worker *worker, const struct settings *settings)
{
struct msg *task = NULL;
struct cmd_dispatcher *dispatcher = NULL;
int ret = 0;
- ret = cmd_dispatcher_create(&dispatcher, cmds, sizeof(cmds) / sizeof(cmds[0]), NULL);
+ ret = cmd_dispatcher_create(&dispatcher, commands, numof_commands, NULL);
if (ret < 0)
return ret;