From: Chris Hofstaedtler Date: Mon, 10 May 2021 08:12:59 +0000 (+0200) Subject: Tidy up style nits X-Git-Tag: auth-4.5.0-alpha1~7^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e97d53cfa6cff98d0c04e5a7d8b0b21b37d4a04;p=thirdparty%2Fpdns.git Tidy up style nits --- diff --git a/pdns/auth-domaincache.cc b/pdns/auth-domaincache.cc index 8c5959dffd..df86df8483 100644 --- a/pdns/auth-domaincache.cc +++ b/pdns/auth-domaincache.cc @@ -33,8 +33,8 @@ extern StatBag S; AuthDomainCache::AuthDomainCache(size_t mapsCount) : d_maps(mapsCount) { - S.declare("domain-cache-hit", "Number of hits on the domain cache"); - S.declare("domain-cache-miss", "Number of misses on the domain cache"); + S.declare("domain-cache-hit", "Number of domain cache hits"); + S.declare("domain-cache-miss", "Number of domain cache misses"); S.declare("domain-cache-size", "Number of entries in the domain cache", StatType::gauge); d_statnumhit = S.getPointer("domain-cache-hit"); @@ -109,7 +109,7 @@ void AuthDomainCache::replace(const vector>& domain_indices) { WriteLock globalLock(d_mut); if (d_replacePending) { - // add/replace all domains created while data collection for replace() was already running. + // add/replace all domains created while data collection for replace() was already in progress. for (const tuple& tup : d_pendingAdds) { const DNSName& domain = tup.get<0>(); CacheValue val; diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 82ca91a4ff..dfbb2dd473 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -181,7 +181,7 @@ void declareArguments() ::arg().set("cache-ttl","Seconds to store packets in the PacketCache")="20"; ::arg().set("negquery-cache-ttl","Seconds to store negative query results in the QueryCache")="60"; ::arg().set("query-cache-ttl","Seconds to store query results in the QueryCache")="20"; - ::arg().set("domain-cache-ttl","Seconds to cache list of known domains")="0"; + ::arg().set("domain-cache-ttl", "Seconds to cache list of known domains") = "0"; ::arg().set("server-id", "Returned when queried for 'id.server' TXT or NSID, defaults to hostname - disabled or custom")=""; ::arg().set("default-soa-content","Default SOA content")="a.misconfigured.dns.server.invalid hostmaster.@ 0 10800 3600 604800 3600"; ::arg().set("default-soa-edit","Default SOA-EDIT value")=""; @@ -682,10 +682,10 @@ void mainthread() uint32_t secpollSince = 0; uint32_t domainCacheUpdateSince = 0; for(;;) { - const uint32_t slept = g_domainCache.getTTL() == 0 ? secpollInterval : std::min(secpollInterval, g_domainCache.getTTL()); - sleep(slept); // if any signals arrive, we might run more often than expected. + const uint32_t sleeptime = g_domainCache.getTTL() == 0 ? secpollInterval : std::min(secpollInterval, g_domainCache.getTTL()); + sleep(sleeptime); // if any signals arrive, we might run more often than expected. - domainCacheUpdateSince += slept; + domainCacheUpdateSince += sleeptime; if (domainCacheUpdateSince >= g_domainCache.getTTL()) { try { UeberBackend B; @@ -700,7 +700,7 @@ void mainthread() } } - secpollSince += slept; + secpollSince += sleeptime; if (secpollSince >= secpollInterval) { secpollSince = 0; try { diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 6aa13fe695..15e4221e87 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -357,7 +357,7 @@ bool UeberBackend::getAuth(const DNSName &target, const QType& qtype, SOAData* s int zoneId{-1}; if(cachedOk && g_domainCache.isEnabled()) { if (g_domainCache.getEntry(shorter, zoneId)) { - // Zone exists in domain cache, directly lookup SOA. + // Zone exists in domain cache, directly look up SOA. // XXX: this code path and the cache lookup below should be merged; but that needs the code path below to also use ANY. // Or it should just also use lookup(). DNSZoneRecord zr;