]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsname: tidy some implicit conversion
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Fri, 19 Jan 2024 10:47:16 +0000 (11:47 +0100)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Fri, 19 Jan 2024 10:47:16 +0000 (11:47 +0100)
pdns/dnsname.cc

index e02f6d4015e63894f28f3e136cb3ed61f8b103c9..0c45c96c51fb0c758842c6c4ae98e8f75fa9f418 100644 (file)
@@ -161,13 +161,13 @@ void DNSName::packetParser(const char* qpos, size_t len, size_t offset, bool unc
     }
     pos+=labellen;
   }
-  if(d_storage.empty()) {
+  if (d_storage.empty()) {
     d_storage.append(1, (char)0); // we just parsed the root
   }
-  if(consumed) {
+  if (consumed != nullptr) {
     *consumed = pos - opos - offset;
   }
-  if(qtype) {
+  if (qtype != nullptr) {
     if (pos + 2 > end) {
       throw std::range_error("Trying to read qtype past the end of the buffer ("+std::to_string((pos - opos) + 2)+ " > "+std::to_string(len)+")");
     }