condition: return (Condition*) NULL from condition_free()
Follow our usual coding style.
This commit is contained in:
parent
dce719f6c1
commit
411e835c50
|
@ -73,11 +73,11 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
void condition_free(Condition *c) {
|
Condition* condition_free(Condition *c) {
|
||||||
assert(c);
|
assert(c);
|
||||||
|
|
||||||
free(c->parameter);
|
free(c->parameter);
|
||||||
free(c);
|
return mfree(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
Condition* condition_free_list_type(Condition *head, ConditionType type) {
|
Condition* condition_free_list_type(Condition *head, ConditionType type) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ typedef struct Condition {
|
||||||
} Condition;
|
} Condition;
|
||||||
|
|
||||||
Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate);
|
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);
|
Condition* condition_free_list_type(Condition *first, ConditionType type);
|
||||||
static inline Condition* condition_free_list(Condition *first) {
|
static inline Condition* condition_free_list(Condition *first) {
|
||||||
return condition_free_list_type(first, _CONDITION_TYPE_INVALID);
|
return condition_free_list_type(first, _CONDITION_TYPE_INVALID);
|
||||||
|
|
Loading…
Reference in a new issue