From: Kees Monshouwer Date: Sun, 4 Jun 2017 11:12:13 +0000 (+0200) Subject: add makeUsRelative() to DNSName class X-Git-Tag: auth-4.0.4-rc1^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c19bc501ebf5e43eba73110551a63b63136e44d4;p=thirdparty%2Fpdns.git add makeUsRelative() to DNSName class --- diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh index 3e7ab1df69..fa7f46a8d6 100644 --- a/pdns/dnsname.hh +++ b/pdns/dnsname.hh @@ -86,12 +86,15 @@ public: DNSName makeRelative(const DNSName& zone) const; DNSName makeLowerCase() const { - DNSName ret; - ret.d_storage = d_storage; - for(auto & c : ret.d_storage) { + DNSName ret(*this); + ret.makeUsLowerCase(); + return ret; + } + void makeUsLowerCase() + { + for(auto & c : d_storage) { c=dns2_tolower(c); } - return ret; } void makeUsRelative(const DNSName& zone); DNSName labelReverse() const;