]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnstap: Fix a missed optimization reported by Coverity
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Jan 2024 07:54:37 +0000 (08:54 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Jan 2024 07:54:37 +0000 (08:54 +0100)
pdns/dnstap.cc

index beb7ac5e8d4b1db43e458492bca75f55e860f733..b032da9876632406bbcb6c0498570551f74bb2c7 100644 (file)
@@ -63,7 +63,7 @@ std::string&& DnstapMessage::getBuffer()
 }
 
 DnstapMessage::DnstapMessage(std::string&& buffer, DnstapMessage::MessageType type, const std::string& identity, const ComboAddress* requestor, const ComboAddress* responder, DnstapMessage::ProtocolType protocol, const char* packet, const size_t len, const struct timespec* queryTime, const struct timespec* responseTime, const boost::optional<const DNSName&>& auth) :
-  d_buffer(buffer)
+  d_buffer(std::move(buffer))
 {
   protozero::pbf_writer pbf{d_buffer};