Skip to content

Commit

Permalink
dnsname: tidy some implicit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
chbruyand committed Jan 19, 2024
1 parent 05fe745 commit 7cd99b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdns/dnsname.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)+")");
}
Expand Down

0 comments on commit 7cd99b0

Please sign in to comment.