1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

resolve: drop never matched condition

As dns_scope_good_domain() does not return negative errno.
This commit is contained in:
Yu Watanabe 2022-02-23 07:49:40 +09:00
parent 6e4d122ad1
commit 830f50ab1e

View File

@ -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;