summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-09-09 02:27:56 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-11 20:05:19 +0200
commit3ed10b2ee85d06ee120cb313734a7cae9983024e (patch)
tree3d6ca31dcb2940cb3bd04bc9c631f4cd832e9626
parent2f6406914b3e30e21ee5318eac640b2a76c75c81 (diff)
downloadsystemd-3ed10b2ee85d06ee120cb313734a7cae9983024e.tar.gz
core/slice: explicitly specify return value
(cherry picked from commit 93c5b904597ee86cbf65d8b5dc9d68428f2a2130)
-rw-r--r--src/core/slice.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/slice.c b/src/core/slice.c
index f4f63fcb5b..c6884d8c3b 100644
--- a/src/core/slice.c
+++ b/src/core/slice.c
@@ -383,8 +383,10 @@ static int slice_freezer_action(Unit *s, FreezerAction action) {
assert(s);
assert(IN_SET(action, FREEZER_FREEZE, FREEZER_THAW));
- if (!slice_freezer_action_supported_by_children(s))
- return log_unit_warning(s, "Requested freezer operation is not supported by all children of the slice");
+ if (!slice_freezer_action_supported_by_children(s)) {
+ log_unit_warning(s, "Requested freezer operation is not supported by all children of the slice");
+ return 0;
+ }
HASHMAP_FOREACH_KEY(v, member, s->dependencies[UNIT_BEFORE], i) {
if (UNIT_DEREF(member->slice) != s)