summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-24 21:36:09 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:30 +0200
commit2c289ea8332a2c0777d8940058ff7a6293f59b6c (patch)
treeff77eb03f3e9a5f4e39c73b85d122f5abaa0ac45 /src/core/service.c
parent463d0d15690c7abe2172a23ae23c5547693dd71f (diff)
core: introduce MANAGER_IS_RELOADING() macro
This replaces the old function call manager_is_reloading_or_reexecuting() which was used only at very few places. Use the new macro wherever we check whether we are reloading. This should hopefully make things a bit more readable, given the nature of Manager:n_reloading being a counter.
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 7aea6f7ff4..58084e2f82 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -920,7 +920,7 @@ static void service_set_state(Service *s, ServiceState state) {
/* For the inactive states unit_notify() will trim the cgroup,
* but for exit we have to do that ourselves... */
- if (state == SERVICE_EXITED && UNIT(s)->manager->n_reloading <= 0)
+ if (state == SERVICE_EXITED && !MANAGER_IS_RELOADING(UNIT(s)->manager))
unit_prune_cgroup(UNIT(s));
/* For remain_after_exit services, let's see if we can "release" the