From: Otto Moerbeek Date: Tue, 16 Jan 2024 08:52:48 +0000 (+0100) Subject: 1524889 COPY_INSTEAD_OF_MOVE X-Git-Tag: dnsdist-1.9.0-rc1~33^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7e14d5f528906d33b0d20d5f2030c5f009eb507;p=thirdparty%2Fpdns.git 1524889 COPY_INSTEAD_OF_MOVE 1524930 COPY_INSTEAD_OF_MOVE --- diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 7fd669d3cb..8755548122 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -1878,7 +1878,7 @@ int SyncRes::doResolveNoQNameMinimization(const DNSName& qname, const QType qtyp if (depth > bound || (d_outqueries > 10 && d_throttledqueries > 5 && depth > bound * 2 / 3)) { string msg = "More than " + std::to_string(bound) + " (adjusted max-recursion-depth) levels of recursion needed while resolving " + qname.toLogString(); LOG(prefix << qname << ": " << msg << endl); - throw ImmediateServFailException(msg); + throw ImmediateServFailException(std::move(msg)); } } @@ -2651,7 +2651,7 @@ bool SyncRes::doCNAMECacheCheck(const DNSName& qname, const QType qtype, vector< if (qname == newTarget) { string msg = "Got a CNAME referral (from cache) to self"; LOG(prefix << qname << ": " << msg << endl); - throw ImmediateServFailException(msg); + throw ImmediateServFailException(std::move(msg)); } if (newTarget.isPartOf(qname)) {