From 1ed619b1b38a57f9182b3d4a227efbd5ccc5e868 Mon Sep 17 00:00:00 2001 From: Nicko Dehaine Date: Thu, 2 Jan 2020 10:55:04 -0800 Subject: [PATCH] Style fixes --- pdns/dnsrecords.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 = ""; -- 2.47.2