]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: initialize all return values on successful exit of dns_cache_lookup()
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Feb 2017 18:55:34 +0000 (19:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2017 09:25:16 +0000 (10:25 +0100)
Following our coding style on success we should initialize all return
parameters of a function. We missed to cases for dns_cache_lookup() (but
covered all others), fix them too.

src/resolve/resolved-dns-cache.c

index ee93147015a3dab2218316d06b2ff7d8ca6b3fcf..46a25c2bee44831442617818271c533e5fe1420c 100644 (file)
@@ -865,6 +865,8 @@ int dns_cache_lookup(DnsCache *c, DnsResourceKey *key, bool clamp_ttl, int *rcod
 
                 *ret = NULL;
                 *rcode = DNS_RCODE_SUCCESS;
+                *authenticated = false;
+
                 return 0;
         }
 
@@ -879,6 +881,8 @@ int dns_cache_lookup(DnsCache *c, DnsResourceKey *key, bool clamp_ttl, int *rcod
 
                 *ret = NULL;
                 *rcode = DNS_RCODE_SUCCESS;
+                *authenticated = false;
+
                 return 0;
         }