]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Use boolean for negation flag
authorNicko Dehaine <nicko@threatstop.com>
Thu, 2 Jan 2020 18:31:20 +0000 (10:31 -0800)
committerNicko Dehaine <nicko@threatstop.com>
Tue, 18 Aug 2020 23:16:44 +0000 (23:16 +0000)
pdns/dnsrecords.cc

index 9e7be736fa4fddcc88faa06b53d7ef655e22acc8..22ceb16194a4a2eaeae9b1ef6987128726ed464a 100644 (file)
@@ -540,12 +540,12 @@ std::shared_ptr<DNSRecordContent> APLRecordContent::make(const string& zone) {
 
   auto ret=std::make_shared<APLRecordContent>();
 
-  // Strip the optional leading ! (negate)
+  // Parse the optional leading ! (negate)
   if (zone[0] == '!') {
-    ret->d_n = 1;
+    ret->d_n = true;
     record = zone.substr(1, zone.length()-1);
   } else {
-    ret->d_n = 0;
+    ret->d_n = false;
     record = zone;
   }
 
@@ -643,7 +643,7 @@ string APLRecordContent::getZoneRepresentation(bool noDot) const {
   Netmask nm;
 
   // Negation flag
-  if (d_n == 1) {
+  if (d_n == true) {
     s_n = "!";
   } else {
     s_n = "";