From: Nicko Dehaine Date: Thu, 2 Jan 2020 18:55:04 +0000 (-0800) Subject: Style fixes X-Git-Tag: rec-4.4.0-beta1~4^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ed619b1b38a57f9182b3d4a227efbd5ccc5e868;p=thirdparty%2Fpdns.git Style fixes --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 22ceb16194..5bef9862a7 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -601,9 +601,9 @@ std::shared_ptr APLRecordContent::make(const string& zone) { bzero(ret->d_ip6, sizeof(ret->d_ip6)); bytes = 16; // Start by assuming we'll send 16 bytes done_trimming = false; - for (int i=15; i>=0; i--) { - ret->d_ip6[i] = nm.getNetwork().sin6.sin6_addr.s6_addr[i]; - if (nm.getNetwork().sin6.sin6_addr.s6_addr[i] == 0 and !done_trimming) { + for (int i=0; i<16; i++) { + ret->d_ip6[15-i] = nm.getNetwork().sin6.sin6_addr.s6_addr[15-i]; + if (nm.getNetwork().sin6.sin6_addr.s6_addr[15-i] == 0 and !done_trimming) { // trailing 0 byte, update length bytes--; } else { @@ -643,7 +643,7 @@ string APLRecordContent::getZoneRepresentation(bool noDot) const { Netmask nm; // Negation flag - if (d_n == true) { + if (d_n) { s_n = "!"; } else { s_n = "";