]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Formatting
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 5 Sep 2023 08:54:39 +0000 (10:54 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 22 Sep 2023 07:19:44 +0000 (09:19 +0200)
(cherry picked from commit dab9636b332f680283636c66547489f9a2cdb250)

pdns/recursordist/aggressive_nsec.cc
pdns/recursordist/test-aggressive_nsec_cc.cc

index c22d81ea61198e777df797e32d4621f2b732a927..b419f5ef2548810c54f22800341cfc83196ab490 100644 (file)
@@ -175,7 +175,7 @@ void AggressiveNSECCache::prune(time_t now)
       // This is comparable to what cachecleaner.hh::pruneMutexCollectionsVector() is doing, look there for an explanation
       entriesCount -= zoneSize;
       uint64_t trimmedFromThisZone = 0;
-      for (auto it = sidx.begin(); it != sidx.end() && trimmedFromThisZone < toTrimForThisZone; ) {
+      for (auto it = sidx.begin(); it != sidx.end() && trimmedFromThisZone < toTrimForThisZone;) {
         it = sidx.erase(it);
         ++erased;
         ++trimmedFromThisZone;
index 879f81b9a3410c8dfbc6b454337ce8e546c3a20c..54bd7c043b3b6be200e9eba8a13fa3943dd7cf48 100644 (file)
@@ -1081,7 +1081,9 @@ BOOST_AUTO_TEST_CASE(test_aggressive_nsec_replace)
   const size_t testSize = 10000;
   auto cache = make_unique<AggressiveNSECCache>(testSize);
 
-  struct timeval now{};
+  struct timeval now
+  {
+  };
   Utility::gettimeofday(&now, nullptr);
 
   vector<DNSName> names;
@@ -1119,7 +1121,7 @@ BOOST_AUTO_TEST_CASE(test_aggressive_nsec_replace)
 
   auto diff2 = time.udiff(true);
   // Check that replace is about equally fast as insert
-  BOOST_ASSERT(diff1 < diff2 * 1.2 && diff2 < diff1 * 1.2);
+  BOOST_CHECK(diff1 < diff2 * 1.2 && diff2 < diff1 * 1.2);
 }
 
 BOOST_AUTO_TEST_CASE(test_aggressive_nsec_wiping)