From: Nicko Dehaine Date: Thu, 2 Jan 2020 18:31:20 +0000 (-0800) Subject: Use boolean for negation flag X-Git-Tag: rec-4.4.0-beta1~4^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4855620415fdf228937d68cc988279035d71cc62;p=thirdparty%2Fpdns.git Use boolean for negation flag --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 9e7be736fa..22ceb16194 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -540,12 +540,12 @@ std::shared_ptr APLRecordContent::make(const string& zone) { auto ret=std::make_shared(); - // 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 = "";