]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
1524889 COPY_INSTEAD_OF_MOVE
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 16 Jan 2024 08:52:48 +0000 (09:52 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 16 Jan 2024 08:52:48 +0000 (09:52 +0100)
1524930 COPY_INSTEAD_OF_MOVE

pdns/recursordist/syncres.cc

index 7fd669d3cb33c0cdd93fb759d3fd7a7bf353f4ed..87555481223219e9c84bfc5b03fc72eb1b9ecdaa 100644 (file)
@@ -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)) {