diff options
Diffstat (limited to 'src/uci')
| -rw-r--r-- | src/uci/command.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/uci/command.c b/src/uci/command.c index 327e0e2..17a0c9a 100644 --- a/src/uci/command.c +++ b/src/uci/command.c @@ -6,7 +6,7 @@ void uci_cmd_init(uci_cmd_t *cmd) { cmd->empty = true; cmd->args_capacity = 32; - cmd->args = calloc(sizeof(char) * MAX_TOKEN_SIZE, output.args_capacity); + cmd->args = calloc(sizeof(char) * MAX_TOKEN_SIZE, cmd->args_capacity); } bool is_valid_cmd(const char *token) { @@ -91,7 +91,8 @@ void uci_cmd_deinit(uci_cmd_t cmd) { #include <string.h> bool test_uci_cmd_t() { - uci_cmd_t cmd = uci_cmd_init(); + uci_cmd_t cmd; + uci_cmd_init(&cmd); uci_cmd_set_root(&cmd, "root"); uci_cmd_append_arg(&cmd, "arg1"); uci_cmd_append_arg(&cmd, "arg2"); |
