]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Apply suggestions from code review
authorOtto Moerbeek <otto@drijf.net>
Fri, 18 Sep 2020 08:04:22 +0000 (10:04 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Sep 2020 08:04:22 +0000 (10:04 +0200)
Co-authored-by: Remi Gacogne <rgacogne+github@valombre.net>
pdns/recursordist/negcache.cc

index 3f4c13a130a384477442151d56248915a7dabdd6..a2e5036867ebc28814d4562a9262e52407d4b38c 100644 (file)
@@ -104,7 +104,7 @@ bool NegCache::get(const DNSName& qname, const QType& qtype, const struct timeva
   auto& map = getMap(qname);
   const lock l(map);
 
-  const auto& idx = map.d_map.get<2>();
+  const auto& idx = map.d_map.get<NegCacheEntry>();
   auto range = idx.equal_range(qname);
   auto ni = range.first;
 
@@ -112,7 +112,7 @@ bool NegCache::get(const DNSName& qname, const QType& qtype, const struct timeva
     // We have an entry
     if ((!typeMustMatch && ni->d_qtype.getCode() == 0) || ni->d_qtype == qtype) {
       // We match the QType or the whole name is denied
-      auto firstIndexIterator = map.d_map.project<0>(ni);
+      auto firstIndexIterator = map.d_map.project<CompositeKey>(ni);
 
       if (now.tv_sec < ni->d_ttd) {
         // Not expired