From: Axel Viala Date: Wed, 14 Sep 2022 13:22:36 +0000 (+0200) Subject: getNSEC3PARAM: Use null-ptr instead of 0. X-Git-Tag: rec-4.8.0-alpha1~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4b5bb02d06be210a18b011cc35d0f9b45016c5a;p=thirdparty%2Fpdns.git getNSEC3PARAM: Use null-ptr instead of 0. --- diff --git a/modules/bindbackend/binddnssec.cc b/modules/bindbackend/binddnssec.cc index 9dd6511626..ac11f76239 100644 --- a/modules/bindbackend/binddnssec.cc +++ b/modules/bindbackend/binddnssec.cc @@ -209,7 +209,7 @@ bool Bind2Backend::getNSEC3PARAM(const DNSName& name, NSEC3PARAMRecordContent* n if (!safeGetBBDomainInfo(name, &bbd)) return false; - if (ns3p) { + if (ns3p != nullptr) { *ns3p = bbd.d_nsec3param; } diff --git a/pdns/dbdnsseckeeper.cc b/pdns/dbdnsseckeeper.cc index 0321ecc012..de20ab9ed0 100644 --- a/pdns/dbdnsseckeeper.cc +++ b/pdns/dbdnsseckeeper.cc @@ -336,7 +336,7 @@ bool DNSSECKeeper::getNSEC3PARAM(const DNSName& zname, NSEC3PARAMRecordContent* } static int maxNSEC3Iterations=::arg().asNum("max-nsec3-iterations"); - if(ns3p) { + if(ns3p != nullptr) { *ns3p = NSEC3PARAMRecordContent(value); if (ns3p->d_iterations > maxNSEC3Iterations && !isPresigned(zname, useCache)) { ns3p->d_iterations = maxNSEC3Iterations; @@ -347,7 +347,7 @@ bool DNSSECKeeper::getNSEC3PARAM(const DNSName& zname, NSEC3PARAMRecordContent* ns3p->d_algorithm = 1; } } - if(narrow) { + if(narrow != nullptr) { if(useCache) { getFromMeta(zname, "NSEC3NARROW", value); } diff --git a/pdns/dnsseckeeper.hh b/pdns/dnsseckeeper.hh index b3082d80d7..48bd0f3c6e 100644 --- a/pdns/dnsseckeeper.hh +++ b/pdns/dnsseckeeper.hh @@ -204,7 +204,7 @@ public: bool unpublishKey(const DNSName& zname, unsigned int id); bool checkKeys(const DNSName& zname, vector* errorMessages = nullptr); - bool getNSEC3PARAM(const DNSName& zname, NSEC3PARAMRecordContent* n3p=0, bool* narrow=0, bool useCache=true); + bool getNSEC3PARAM(const DNSName& zname, NSEC3PARAMRecordContent* n3p=nullptr, bool* narrow=nullptr, bool useCache=true); bool checkNSEC3PARAM(const NSEC3PARAMRecordContent& ns3p, string& msg); bool setNSEC3PARAM(const DNSName& zname, const NSEC3PARAMRecordContent& n3p, const bool& narrow=false); bool unsetNSEC3PARAM(const DNSName& zname);