]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
getNSEC3PARAM: Use null-ptr instead of 0.
authorAxel Viala <axel.viala@darnuria.eu>
Wed, 14 Sep 2022 13:22:36 +0000 (15:22 +0200)
committerAxel Viala <axel.viala@darnuria.eu>
Wed, 14 Sep 2022 14:42:21 +0000 (16:42 +0200)
modules/bindbackend/binddnssec.cc
pdns/dbdnsseckeeper.cc
pdns/dnsseckeeper.hh

index 9dd6511626c5694734bc7acb924498cf4a5835a9..ac11f76239116b7220ec755a07686958b8433d3e 100644 (file)
@@ -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;
   }
 
index 0321ecc012ac7145c466ab5ae286297b5f6e0909..de20ab9ed09e47c93bbd8044885529be9d7423f8 100644 (file)
@@ -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);
     }
index b3082d80d7f7399a6eecbecf1947e52afd0ba7e7..48bd0f3c6eebbf8e5e3153818409900d9af93cf8 100644 (file)
@@ -204,7 +204,7 @@ public:
   bool unpublishKey(const DNSName& zname, unsigned int id);
   bool checkKeys(const DNSName& zname, vector<string>* 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);