summaryrefslogtreecommitdiff
path: root/src/target.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-01-15 12:25:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2012-01-16 13:34:42 +0100
commit1124fe6f01b1d59d016c238026f20380f38d98dc (patch)
tree15cf55a860c5b1faabb7c09eeb8fea0e138a08c1 /src/target.c
parentac155bb885f9ea8aac3979a6b2686f0c8a9cc6e3 (diff)
unit: use the UNIT() macro consistently
The UNIT() macro upcasts from specific unit types to the base Unit. Use it everywhere, rather than accessing the 'meta' member directly.
Diffstat (limited to 'src/target.c')
-rw-r--r--src/target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target.c b/src/target.c
index fb67ff3c38..6c1e0c368a 100644
--- a/src/target.c
+++ b/src/target.c
@@ -45,7 +45,7 @@ static void target_set_state(Target *t, TargetState state) {
if (state != old_state)
log_debug("%s changed %s -> %s",
- t->meta.id,
+ UNIT(t)->id,
target_state_to_string(old_state),
target_state_to_string(state));
@@ -75,7 +75,7 @@ static int target_add_default_dependencies(Target *t) {
* sure we don't create a loop. */
for (k = 0; k < ELEMENTSOF(deps); k++)
- SET_FOREACH(other, t->meta.dependencies[deps[k]], i)
+ SET_FOREACH(other, UNIT(t)->dependencies[deps[k]], i)
if ((r = unit_add_default_target_dependency(other, UNIT(t))) < 0)
return r;