From 93e63b2a351df80c893b3771b19e313af3c900b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 18 Nov 2019 18:15:44 +0100 Subject: [PATCH] core/path: minor simplification --- src/core/path.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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); + LIST_FOREACH(spec, s, p->specs) + if (path_spec_check_good(s, initial)) + return true; - if (good) - break; - } - - return good; + return false; } static void path_enter_waiting(Path *p, bool initial, bool recheck) {