]> granicus.if.org Git - pdns/commitdiff
rec: Initialize MemRecursorCache::d_state in the ctor
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 28 Jun 2017 08:57:49 +0000 (10:57 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 28 Jun 2017 08:57:49 +0000 (10:57 +0200)
It's always set in `MemRecursorCache::replace()`, which should be the
only place where we insert new values, but the explicit init makes
Coverity happy.

pdns/recursor_cache.hh

index 831a86f619467d8802e10be89bc851ea9bab125a..e928d91c2dc9b1be59492cd09bac1844f9f43a36 100644 (file)
@@ -74,7 +74,7 @@ private:
   struct CacheEntry
   {
     CacheEntry(const boost::tuple<DNSName, uint16_t, Netmask>& key, const vector<shared_ptr<DNSRecordContent>>& records, bool auth) : 
-      d_records(records), d_qname(key.get<0>()), d_netmask(key.get<2>()), d_ttd(0), d_qtype(key.get<1>()), d_auth(auth)
+      d_records(records), d_qname(key.get<0>()), d_netmask(key.get<2>()), d_state(Indeterminate), d_ttd(0), d_qtype(key.get<1>()), d_auth(auth)
     {}
 
     typedef vector<std::shared_ptr<DNSRecordContent>> records_t;
@@ -84,7 +84,7 @@ private:
     }
 
     records_t d_records;
-    vector<std::shared_ptr<RRSIGRecordContent>> d_signatures;
+    std::vector<std::shared_ptr<RRSIGRecordContent>> d_signatures;
     std::vector<std::shared_ptr<DNSRecord>> d_authorityRecs;
     DNSName d_qname;
     Netmask d_netmask;