From: Aki Tuomi Date: Fri, 30 Oct 2020 19:47:22 +0000 (+0200) Subject: pdns: dnsseckeeper - Clarify cache clearing never fails X-Git-Tag: dnsdist-1.7.0-alpha1~10^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffac2e542ca27619c425b417faf3bb210a9ebe42;p=thirdparty%2Fpdns.git pdns: dnsseckeeper - Clarify cache clearing never fails --- diff --git a/pdns/dbdnsseckeeper.cc b/pdns/dbdnsseckeeper.cc index 650580a53e..a318a36ada 100644 --- a/pdns/dbdnsseckeeper.cc +++ b/pdns/dbdnsseckeeper.cc @@ -127,7 +127,8 @@ void DNSSECKeeper::clearAllCaches() { s_metacache.clear(); } - +/* This function never fails, the return value is to simplify call chains + elsewhere so we can do mutate && clear */ bool DNSSECKeeper::clearKeyCache(const DNSName& name) { WriteLock l(&s_keycachelock); @@ -145,8 +146,8 @@ bool DNSSECKeeper::clearMetaCache(const DNSName& name) void DNSSECKeeper::clearCaches(const DNSName& name) { - clearKeyCache(name); - clearMetaCache(name); + (void)clearKeyCache(name); + (void)clearMetaCache(name); } bool DNSSECKeeper::addKey(const DNSName& name, const DNSSECPrivateKey& dpk, int64_t& id, bool active, bool published)