From: Charles-Henri Bruyand Date: Fri, 19 Jan 2024 10:47:16 +0000 (+0100) Subject: dnsname: tidy some implicit conversion X-Git-Tag: dnsdist-1.9.0-rc1~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cd99b086bc1ed191d7feef63d1e51b96a9664ec;p=thirdparty%2Fpdns.git dnsname: tidy some implicit conversion --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index e02f6d4015..0c45c96c51 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -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)+")"); }