mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
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;
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user