summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-01-30 17:27:45 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-12 11:59:59 +0100
commitef3fc326b9cb080134916683b5ad7095d9e3db13 (patch)
tree3946a8eef3263e04cdac117d12b67a548b69853a
parentcore: add helper macros for deserialization (diff)
downloadsystemd-ef3fc326b9cb080134916683b5ad7095d9e3db13.tar.xz
systemd-ef3fc326b9cb080134916683b5ad7095d9e3db13.zip
manager: remove unnecessary conditional
-rw-r--r--src/core/manager.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index c7cd1fbc6d..ee28bf4e98 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1188,18 +1188,15 @@ static void unit_gc_sweep(Unit *u, unsigned gc_marker) {
is_bad = false;
}
- if (u->refs_by_target) {
- const UnitRef *ref;
+ const UnitRef *ref;
+ LIST_FOREACH(refs_by_target, ref, u->refs_by_target) {
+ unit_gc_sweep(ref->source, gc_marker);
- LIST_FOREACH(refs_by_target, ref, u->refs_by_target) {
- unit_gc_sweep(ref->source, gc_marker);
-
- if (ref->source->gc_marker == gc_marker + GC_OFFSET_GOOD)
- goto good;
+ if (ref->source->gc_marker == gc_marker + GC_OFFSET_GOOD)
+ goto good;
- if (ref->source->gc_marker != gc_marker + GC_OFFSET_BAD)
- is_bad = false;
- }
+ if (ref->source->gc_marker != gc_marker + GC_OFFSET_BAD)
+ is_bad = false;
}
if (is_bad)