From: Yu Watanabe Date: Tue, 22 Feb 2022 22:49:40 +0000 (+0900) Subject: resolve: drop never matched condition X-Git-Tag: v251-rc1~233^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=830f50ab1e03fa7ee262876ed42023d10e89688d;p=thirdparty%2Fsystemd.git resolve: drop never matched condition As dns_scope_good_domain() does not return negative errno. --- diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c index 9b296e7aa67..7dc346794e6 100644 --- a/src/resolve/resolved-dns-query.c +++ b/src/resolve/resolved-dns-query.c @@ -744,11 +744,7 @@ int dns_query_go(DnsQuery *q) { continue; match = dns_scope_good_domain(s, q->ifindex, q->flags, name); - if (match < 0) { - log_debug("Couldn't check if '%s' matches against scope, ignoring.", name); - continue; - } - + assert(match >= 0); if (match > found) { /* Does this match better? If so, remember how well it matched, and the first one * that matches this well */ found = match; @@ -780,11 +776,7 @@ int dns_query_go(DnsQuery *q) { continue; match = dns_scope_good_domain(s, q->ifindex, q->flags, name); - if (match < 0) { - log_debug("Couldn't check if '%s' matches against scope, ignoring.", name); - continue; - } - + assert(match >= 0); if (match < found) continue;