condition: return (Condition*) NULL from condition_free()
Follow our usual coding style.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user