aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-06-25 13:20:35 +0900
committerMike Gilbert <floppym@gentoo.org>2018-06-27 14:08:24 -0400
commit793d0885d688059b3a25caf52a8d17d030360b78 (patch)
treec95079d7f38ea91acf07fc7238ca1bc51eeeeba3
parentbus-util: fix error handling (diff)
downloadsystemd-793d0885d688059b3a25caf52a8d17d030360b78.tar.gz
systemd-793d0885d688059b3a25caf52a8d17d030360b78.tar.bz2
systemd-793d0885d688059b3a25caf52a8d17d030360b78.zip
resolve: dns_scope_network_good() does not returns negative errno
(cherry picked from commit 86b112a315464604f4b40222d8bbd912432d640c)
-rw-r--r--src/resolve/resolved-dns-transaction.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index c60b8215a..5805546cf 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/resolve/resolved-dns-transaction.c
@@ -1380,10 +1380,7 @@ static int dns_transaction_prepare(DnsTransaction *t, usec_t ts) {
dns_transaction_stop_timeout(t);
- r = dns_scope_network_good(t->scope);
- if (r < 0)
- return r;
- if (r == 0) {
+ if (!dns_scope_network_good(t->scope)) {
dns_transaction_complete(t, DNS_TRANSACTION_NETWORK_DOWN);
return 0;
}