summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-06-25 06:42:31 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-25 06:42:31 +0200
commitfa6a69d7837f1d5fcd0ba279b51a41a26badaf03 (patch)
tree1a99599390befeaaa378c7a01f8d6b81536d5c6e /src/resolve
parentbootctl: drop dead code (diff)
downloadsystemd-fa6a69d7837f1d5fcd0ba279b51a41a26badaf03.tar.xz
systemd-fa6a69d7837f1d5fcd0ba279b51a41a26badaf03.zip
resolve: drop dead code
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-cache.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c
index 23cd662fb8..403d23d4fb 100644
--- a/src/resolve/resolved-dns-cache.c
+++ b/src/resolve/resolved-dns-cache.c
@@ -680,13 +680,8 @@ int dns_cache_put(
/* Second, add in positive entries for all contained RRs */
DNS_ANSWER_FOREACH_FULL(rr, ifindex, flags, answer) {
- if ((flags & DNS_ANSWER_CACHEABLE) == 0)
- continue;
-
- r = rr_eligible(rr);
- if (r < 0)
- return r;
- if (r == 0)
+ if ((flags & DNS_ANSWER_CACHEABLE) == 0 ||
+ !rr_eligible(rr))
continue;
r = dns_cache_put_positive(