From: Otto Moerbeek Date: Tue, 5 Sep 2023 08:54:39 +0000 (+0200) Subject: Formatting X-Git-Tag: rec-4.9.2~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8b440421c96b360b62a7b07753229f2a4ac03d1;p=thirdparty%2Fpdns.git Formatting (cherry picked from commit dab9636b332f680283636c66547489f9a2cdb250) --- diff --git a/pdns/recursordist/aggressive_nsec.cc b/pdns/recursordist/aggressive_nsec.cc index c22d81ea61..b419f5ef25 100644 --- a/pdns/recursordist/aggressive_nsec.cc +++ b/pdns/recursordist/aggressive_nsec.cc @@ -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; diff --git a/pdns/recursordist/test-aggressive_nsec_cc.cc b/pdns/recursordist/test-aggressive_nsec_cc.cc index 879f81b9a3..54bd7c043b 100644 --- a/pdns/recursordist/test-aggressive_nsec_cc.cc +++ b/pdns/recursordist/test-aggressive_nsec_cc.cc @@ -1081,7 +1081,9 @@ BOOST_AUTO_TEST_CASE(test_aggressive_nsec_replace) const size_t testSize = 10000; auto cache = make_unique(testSize); - struct timeval now{}; + struct timeval now + { + }; Utility::gettimeofday(&now, nullptr); vector 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)