From: Zbigniew Jędrzejewski-Szmek Date: Mon, 18 Nov 2019 17:15:44 +0000 (+0100) Subject: core/path: minor simplification X-Git-Tag: v244-rc1~14^2~3 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=93e63b2a351df80c893b3771b19e313af3c900b0 core/path: minor simplification --- diff --git a/src/core/path.c b/src/core/path.c index dff551f3772..2872f103cee 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -501,18 +501,14 @@ fail: static bool path_check_good(Path *p, bool initial) { PathSpec *s; - bool good = false; assert(p); - LIST_FOREACH(spec, s, p->specs) { - good = path_spec_check_good(s, initial); - - if (good) - break; - } + LIST_FOREACH(spec, s, p->specs) + if (path_spec_check_good(s, initial)) + return true; - return good; + return false; } static void path_enter_waiting(Path *p, bool initial, bool recheck) {