summaryrefslogtreecommitdiff
path: root/src/journal/journald-rate-limit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-14 06:10:14 +0200
committerLennart Poettering <lennart@poettering.net>2013-10-14 06:11:19 +0200
commit71fda00f320379f5cbee8e118848de98caaa229d (patch)
tree00a913086d70abadb1185e1343d97df860b0d612 /src/journal/journald-rate-limit.c
parent14bf2c9d375db6a4670bc0ef0e521e35a939a498 (diff)
list: make our list macros a bit easier to use by not requring type spec on each invocation
We can determine the list entry type via the typeof() gcc construct, and so we should to make the macros much shorter to use.
Diffstat (limited to 'src/journal/journald-rate-limit.c')
-rw-r--r--src/journal/journald-rate-limit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/journald-rate-limit.c b/src/journal/journald-rate-limit.c
index 32e35a926d..4b76221527 100644
--- a/src/journal/journald-rate-limit.c
+++ b/src/journal/journald-rate-limit.c
@@ -96,8 +96,8 @@ static void journal_rate_limit_group_free(JournalRateLimitGroup *g) {
if (g->parent->lru_tail == g)
g->parent->lru_tail = g->lru_prev;
- LIST_REMOVE(JournalRateLimitGroup, lru, g->parent->lru, g);
- LIST_REMOVE(JournalRateLimitGroup, bucket, g->parent->buckets[g->hash % BUCKETS_MAX], g);
+ LIST_REMOVE(lru, g->parent->lru, g);
+ LIST_REMOVE(bucket, g->parent->buckets[g->hash % BUCKETS_MAX], g);
g->parent->n_groups --;
}
@@ -156,8 +156,8 @@ static JournalRateLimitGroup* journal_rate_limit_group_new(JournalRateLimit *r,
journal_rate_limit_vacuum(r, ts);
- LIST_PREPEND(JournalRateLimitGroup, bucket, r->buckets[g->hash % BUCKETS_MAX], g);
- LIST_PREPEND(JournalRateLimitGroup, lru, r->lru, g);
+ LIST_PREPEND(bucket, r->buckets[g->hash % BUCKETS_MAX], g);
+ LIST_PREPEND(lru, r->lru, g);
if (!g->lru_next)
r->lru_tail = g;
r->n_groups ++;