]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: drop unnecessary local variable
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Mar 2021 20:15:30 +0000 (21:15 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Mar 2021 20:21:43 +0000 (21:21 +0100)
src/resolve/resolved-dns-cache.c

index 09fb8e2c883707677a9a344726b0e974b8e02eb9..0f40e0e40f4c628d588e278c19d3a4007093b2aa 100644 (file)
@@ -416,7 +416,7 @@ static int dns_cache_put_positive(
         _cleanup_(dns_cache_item_freep) DnsCacheItem *i = NULL;
         DnsCacheItem *existing;
         char key_str[DNS_RESOURCE_KEY_STRING_MAX];
-        int r, k;
+        int r;
 
         assert(c);
         assert(rr);
@@ -430,9 +430,9 @@ static int dns_cache_put_positive(
 
         /* New TTL is 0? Delete this specific entry... */
         if (rr->ttl <= 0) {
-                k = dns_cache_remove_by_rr(c, rr);
+                r = dns_cache_remove_by_rr(c, rr);
                 log_debug("%s: %s",
-                          k > 0 ? "Removed zero TTL entry from cache" : "Not caching zero TTL cache entry",
+                          r > 0 ? "Removed zero TTL entry from cache" : "Not caching zero TTL cache entry",
                           dns_resource_key_to_string(rr->key, key_str, sizeof key_str));
                 return 0;
         }