condition: return (Condition*) NULL from condition_free()

Follow our usual coding style.
This commit is contained in:
Lennart Poettering 2020-05-14 18:43:46 +02:00
parent dce719f6c1
commit 411e835c50
2 changed files with 3 additions and 3 deletions

View File

@ -73,11 +73,11 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger
return c;
}
void condition_free(Condition *c) {
Condition* condition_free(Condition *c) {
assert(c);
free(c->parameter);
free(c);
return mfree(c);
}
Condition* condition_free_list_type(Condition *head, ConditionType type) {

View File

@ -67,7 +67,7 @@ typedef struct Condition {
} Condition;
Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate);
void condition_free(Condition *c);
Condition* condition_free(Condition *c);
Condition* condition_free_list_type(Condition *first, ConditionType type);
static inline Condition* condition_free_list(Condition *first) {
return condition_free_list_type(first, _CONDITION_TYPE_INVALID);