]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Silence a 'performance' warning from cppcheck 10035/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 29 Jan 2021 16:02:03 +0000 (17:02 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 29 Jan 2021 16:02:03 +0000 (17:02 +0100)
pdns/dnsdistdist/tcpiohandler.cc

index 7c9aae7c53767c0c6907044416b6e528db5e93b9..e308e2791bb80bcb3671a599b0c5e67ee37682b3 100644 (file)
@@ -294,10 +294,8 @@ int OpenSSLTLSConnection::s_tlsConnIndex = -1;
 class OpenSSLTLSIOCtx: public TLSCtx
 {
 public:
-  OpenSSLTLSIOCtx(TLSFrontend& fe)
+  OpenSSLTLSIOCtx(TLSFrontend& fe): d_feContext(std::make_shared<OpenSSLFrontendContext>(fe.d_addr, fe.d_tlsConfig))
   {
-    d_feContext = std::make_shared<OpenSSLFrontendContext>(fe.d_addr, fe.d_tlsConfig);
-
     d_ticketsKeyRotationDelay = fe.d_tlsConfig.d_ticketsKeyRotationDelay;
 
     if (fe.d_tlsConfig.d_enableTickets && fe.d_tlsConfig.d_numberOfTicketsKeys > 0) {