summaryrefslogtreecommitdiff
path: root/src/core/cgroup.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/core/cgroup.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/core/cgroup.c')
-rw-r--r--src/core/cgroup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 8bf4d896de..f0a97e6818 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -41,7 +41,7 @@ void cgroup_context_free_device_allow(CGroupContext *c, CGroupDeviceAllow *a) {
assert(c);
assert(a);
- LIST_REMOVE(CGroupDeviceAllow, device_allow, c->device_allow, a);
+ LIST_REMOVE(device_allow, c->device_allow, a);
free(a->path);
free(a);
}
@@ -50,7 +50,7 @@ void cgroup_context_free_blockio_device_weight(CGroupContext *c, CGroupBlockIODe
assert(c);
assert(w);
- LIST_REMOVE(CGroupBlockIODeviceWeight, device_weights, c->blockio_device_weights, w);
+ LIST_REMOVE(device_weights, c->blockio_device_weights, w);
free(w->path);
free(w);
}
@@ -59,7 +59,7 @@ void cgroup_context_free_blockio_device_bandwidth(CGroupContext *c, CGroupBlockI
assert(c);
assert(b);
- LIST_REMOVE(CGroupBlockIODeviceBandwidth, device_bandwidths, c->blockio_device_bandwidths, b);
+ LIST_REMOVE(device_bandwidths, c->blockio_device_bandwidths, b);
free(b->path);
free(b);
}
@@ -426,7 +426,7 @@ static int unit_realize_cgroup_now(Unit *u) {
assert(u);
if (u->in_cgroup_queue) {
- LIST_REMOVE(Unit, cgroup_queue, u->manager->cgroup_queue, u);
+ LIST_REMOVE(cgroup_queue, u->manager->cgroup_queue, u);
u->in_cgroup_queue = false;
}
@@ -450,7 +450,7 @@ static void unit_add_to_cgroup_queue(Unit *u) {
if (u->in_cgroup_queue)
return;
- LIST_PREPEND(Unit, cgroup_queue, u->manager->cgroup_queue, u);
+ LIST_PREPEND(cgroup_queue, u->manager->cgroup_queue, u);
u->in_cgroup_queue = true;
}