1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-03 17:47:28 +03:00

journal-rate-limit: make journal_ratelimit_group_free() return NULL

To make it follow our recent coding style.
This commit is contained in:
Yu Watanabe 2024-05-11 20:28:26 +09:00
parent 1cb1538f78
commit bba23ba47f

View File

@ -72,8 +72,9 @@ JournalRateLimit *journal_ratelimit_new(void) {
return r;
}
static void journal_ratelimit_group_free(JournalRateLimitGroup *g) {
assert(g);
static JournalRateLimitGroup* journal_ratelimit_group_free(JournalRateLimitGroup *g) {
if (!g)
return NULL;
if (g->parent) {
assert(g->parent->n_groups > 0);
@ -88,7 +89,7 @@ static void journal_ratelimit_group_free(JournalRateLimitGroup *g) {
}
free(g->id);
free(g);
return mfree(g);
}
void journal_ratelimit_free(JournalRateLimit *r) {