]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: drop dead code
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Jun 2018 04:42:31 +0000 (13:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Jun 2018 04:42:31 +0000 (13:42 +0900)
src/resolve/resolved-dns-cache.c

index 23cd662fb884020e7f20f3bb0544ef4f067c8d62..403d23d4fb99f0e4381f68060927c4270616d34f 100644 (file)
@@ -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(