From d298da97d002b87d0a55c93ab6759207e1c946de Mon Sep 17 00:00:00 2001 From: Axel Viala Date: Mon, 22 Aug 2022 13:46:54 +0200 Subject: [PATCH] fixup: Optionnal removal of plen. --- pdns/dnsname.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index 747225e02b..db09f6c407 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -64,9 +64,9 @@ DNSName::DNSName(const std::string_view sw) if(!std::memchr(p, '\\', length)) { unsigned char lenpos=0; unsigned char labellen=0; - size_t plen=length; - const char* const pbegin=p, *pend=p+plen; - d_storage.reserve(plen+1); + const char* const pbegin=p, *pend=p+length; + + d_storage.reserve(length+1); for(auto iter = pbegin; iter != pend; ) { lenpos = d_storage.size(); if(*iter=='.') -- 2.47.2