From: Remi Gacogne Date: Wed, 28 Jun 2017 08:57:49 +0000 (+0200) Subject: rec: Initialize MemRecursorCache::d_state in the ctor X-Git-Tag: rec-4.1.0-alpha1~43^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5472%2Fhead;p=thirdparty%2Fpdns.git rec: Initialize MemRecursorCache::d_state in the ctor 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. --- diff --git a/pdns/recursor_cache.hh b/pdns/recursor_cache.hh index 831a86f619..e928d91c2d 100644 --- a/pdns/recursor_cache.hh +++ b/pdns/recursor_cache.hh @@ -74,7 +74,7 @@ private: struct CacheEntry { CacheEntry(const boost::tuple& key, const vector>& 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> records_t; @@ -84,7 +84,7 @@ private: } records_t d_records; - vector> d_signatures; + std::vector> d_signatures; std::vector> d_authorityRecs; DNSName d_qname; Netmask d_netmask;