diff options
| author | Federico Angelilli <code@fedang.net> | 2024-11-28 01:09:40 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-11-28 01:09:40 +0100 |
| commit | 737167955e8347ce06718e7a8324c9d2ac89dfba (patch) | |
| tree | d187ac026739c01eb5df22a3954b95eb7bc63a7b /src/action.c | |
| parent | 6ab3b52fbde3ab2ac11e66e4d664f67e108f6aee (diff) | |
Refactor actions
Diffstat (limited to 'src/action.c')
| -rw-r--r-- | src/action.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/action.c b/src/action.c index 3a358c3..e5293e4 100644 --- a/src/action.c +++ b/src/action.c @@ -10,6 +10,9 @@ bool action_perform(action_t *action, block_t *block, config_t *config) { + if (action == NULL) + return true; + block_t *target = block; bool warned = false; bool notify = false; @@ -134,8 +137,10 @@ bool action_resolve(action_t *action, config_t *config) return true; } -void action_free(action_t *action) +void action_clean(action_t *action) { + assert(action != NULL); + for (size_t i = 0; i < action->length; i++) { free(action->parts[i].key); free(action->parts[i].value); |
