summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.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/load-fragment.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/load-fragment.c')
-rw-r--r--src/core/load-fragment.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index f01843d65..fb7efcaa8 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -300,10 +300,10 @@ int config_parse_socket_listen(const char *unit,
p->fd = -1;
if (s->ports) {
- LIST_FIND_TAIL(SocketPort, port, s->ports, tail);
- LIST_INSERT_AFTER(SocketPort, port, s->ports, tail, p);
+ LIST_FIND_TAIL(port, s->ports, tail);
+ LIST_INSERT_AFTER(port, s->ports, tail, p);
} else
- LIST_PREPEND(SocketPort, port, s->ports, p);
+ LIST_PREPEND(port, s->ports, p);
return 0;
}
@@ -1203,7 +1203,7 @@ int config_parse_timer(const char *unit,
v->value = u;
v->calendar_spec = c;
- LIST_PREPEND(TimerValue, value, t->values, v);
+ LIST_PREPEND(value, t->values, v);
return 0;
}
@@ -1323,7 +1323,7 @@ int config_parse_path_spec(const char *unit,
s->type = b;
s->inotify_fd = -1;
- LIST_PREPEND(PathSpec, spec, p->specs, s);
+ LIST_PREPEND(spec, p->specs, s);
return 0;
}
@@ -1657,7 +1657,7 @@ int config_parse_unit_condition_path(const char *unit,
if (!c)
return log_oom();
- LIST_PREPEND(Condition, conditions, u->conditions, c);
+ LIST_PREPEND(conditions, u->conditions, c);
return 0;
}
@@ -1712,7 +1712,7 @@ int config_parse_unit_condition_string(const char *unit,
if (!c)
return log_oom();
- LIST_PREPEND(Condition, conditions, u->conditions, c);
+ LIST_PREPEND(conditions, u->conditions, c);
return 0;
}
@@ -1766,7 +1766,7 @@ int config_parse_unit_condition_null(const char *unit,
if (!c)
return log_oom();
- LIST_PREPEND(Condition, conditions, u->conditions, c);
+ LIST_PREPEND(conditions, u->conditions, c);
return 0;
}
@@ -2128,7 +2128,7 @@ int config_parse_device_allow(
a->w = !!strchr(m, 'w');
a->m = !!strchr(m, 'm');
- LIST_PREPEND(CGroupDeviceAllow, device_allow, c->device_allow, a);
+ LIST_PREPEND(device_allow, c->device_allow, a);
return 0;
}
@@ -2234,7 +2234,7 @@ int config_parse_blockio_device_weight(
w->weight = lu;
- LIST_PREPEND(CGroupBlockIODeviceWeight, device_weights, c->blockio_device_weights, w);
+ LIST_PREPEND(device_weights, c->blockio_device_weights, w);
return 0;
}
@@ -2310,7 +2310,7 @@ int config_parse_blockio_bandwidth(
b->bandwidth = (uint64_t) bytes;
b->read = read;
- LIST_PREPEND(CGroupBlockIODeviceBandwidth, device_bandwidths, c->blockio_device_bandwidths, b);
+ LIST_PREPEND(device_bandwidths, c->blockio_device_bandwidths, b);
return 0;
}