diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-08-15 14:28:35 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-08-15 14:28:35 +0530 |
| commit | f97ea63ac29c08530b1aaff89277262b44ef7a11 (patch) | |
| tree | 2534d597b2356de9dda0412665cf8ba06870526c /src/uci/command.c | |
| parent | 2bf47937bcc5cd29cf8081f922b7615b7e57ed57 (diff) | |
phase A
Diffstat (limited to 'src/uci/command.c')
| -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"); |
