summaryrefslogtreecommitdiffstats
path: root/src/core/slice.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-23 23:24:11 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-24 03:26:21 +0200
commit5dc0c21b31cb92fca468badf06697f9efdca3e1a (patch)
tree9ef773bd1a23e708af54cb1adc5001087683ce36 /src/core/slice.c
parentelf2efi: Do not emit an empty relocation section (diff)
downloadsystemd-5dc0c21b31cb92fca468badf06697f9efdca3e1a.tar.xz
systemd-5dc0c21b31cb92fca468badf06697f9efdca3e1a.zip
core/slice: shorten code a bit
Diffstat (limited to 'src/core/slice.c')
-rw-r--r--src/core/slice.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/slice.c b/src/core/slice.c
index a11ec62724..c87b790a97 100644
--- a/src/core/slice.c
+++ b/src/core/slice.c
@@ -349,17 +349,14 @@ static void slice_enumerate_perpetual(Manager *m) {
static bool slice_freezer_action_supported_by_children(Unit *s) {
Unit *member;
- int r;
assert(s);
UNIT_FOREACH_DEPENDENCY(member, s, UNIT_ATOM_SLICE_OF) {
- if (member->type == UNIT_SLICE) {
- r = slice_freezer_action_supported_by_children(member);
- if (!r)
- return r;
- }
+ if (member->type == UNIT_SLICE &&
+ !slice_freezer_action_supported_by_children(member))
+ return false;
if (!UNIT_VTABLE(member)->freeze)
return false;