From: Axel Viala Date: Mon, 22 Aug 2022 10:24:43 +0000 (+0200) Subject: fixup: Apply @omoerbeek suggestion X-Git-Tag: dnsdist-1.8.0-rc1~209^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5465a97288d26e4bffd4904965d87bd8a6baf70;p=thirdparty%2Fpdns.git fixup: Apply @omoerbeek suggestion --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index 4dde8c3982..74a166a596 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -55,7 +55,7 @@ void DNSName::throwSafeRangeError(const std::string& msg, const char* buf, size_ DNSName::DNSName(const char* p, size_t length) { - if(length == 0 || p[0]==0 || (p[0]=='.' && p[1]==0)) { + if(length == 0 || (length == 1 && p[0]=='.')) { d_storage.assign(1, (char)0); } else { if(!std::memchr(p, '\\', length)) {