From 4d1d0ef693fc605d201c44b899e1ace719bffc6d Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 10 Apr 2019 12:23:49 +0200 Subject: [PATCH] dnsdist: Use initializer list for ConnectionInfo Reported by cppcheck. --- pdns/dnsdist-tcp.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index 878f056a0..1c51cdc16 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -209,12 +209,9 @@ struct ConnectionInfo ConnectionInfo(ClientState* cs_): cs(cs_), fd(-1) { } - ConnectionInfo(ConnectionInfo&& rhs) + ConnectionInfo(ConnectionInfo&& rhs): remote(rhs.remote), cs(rhs.cs), fd(rhs.fd) { - remote = rhs.remote; - cs = rhs.cs; rhs.cs = nullptr; - fd = rhs.fd; rhs.fd = -1; } -- 2.40.0