]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Coverity 1643564 Using a moved object
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Dec 2025 08:43:01 +0000 (09:43 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Dec 2025 08:43:01 +0000 (09:43 +0100)
Looks harmless

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/logging.cc

index b72aa308f64f6b8634ac901e88b8e3f99dc8a389..1db6da080e7a32cdfc8f384b2f4485be12412801 100644 (file)
@@ -50,7 +50,7 @@ void Logger::info(Logr::Priority prio, const std::string& msg) const
 
 void Logger::logMessage(const std::string& msg, const std::optional<std::string>& err) const
 {
-  logMessage(msg, Logr::Absent, std::move(err));
+  logMessage(msg, Logr::Absent, err);
 }
 
 void Logger::logMessage(const std::string& msg, Logr::Priority prio, const std::optional<std::string>& err) const
@@ -64,7 +64,7 @@ void Logger::logMessage(const std::string& msg, Logr::Priority prio, const std::
   Utility::gettimeofday(&entry.d_timestamp);
   entry.name = _name;
   entry.message = msg;
-  entry.error = std::move(err);
+  entry.error = err;
   auto parent = _parent;
   entry.values.insert(_values.begin(), _values.end());
   while (parent) {