From: Yu Watanabe Date: Tue, 23 May 2023 21:24:11 +0000 (+0900) Subject: core/slice: shorten code a bit X-Git-Tag: v254-rc1~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dc0c21b31cb92fca468badf06697f9efdca3e1a;p=thirdparty%2Fsystemd.git core/slice: shorten code a bit --- diff --git a/src/core/slice.c b/src/core/slice.c index a11ec62724b..c87b790a974 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;