]> granicus.if.org Git - icinga2/commitdiff
Remove unnecessary initializers
authorGunnar Beutner <gunnar@beutner.name>
Thu, 23 Oct 2014 17:01:47 +0000 (19:01 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 23 Oct 2014 17:02:16 +0000 (19:02 +0200)
refs #7247

lib/cli/pkiutility.cpp
lib/remote/apilistener.cpp

index cb8abbe09623ed9952c5d82dfc72af974295fa6a..6e07ac579bd162123388d32697b58c86e4dd9ac9 100644 (file)
@@ -183,7 +183,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
                return 1;
        }
 
-       shared_ptr<SSL_CTX> sslContext = make_shared<SSL_CTX>();
+       shared_ptr<SSL_CTX> sslContext;
 
        try {
                sslContext = MakeSSLContext(certfile, keyfile);
@@ -204,7 +204,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
 
        shared_ptr<X509> peerCert = stream->GetPeerCertificate();
 
-       shared_ptr<X509> trustedCert = make_shared<X509>();
+       shared_ptr<X509> trustedCert;
 
        try {
                trustedCert = GetX509Certificate(trustedfile);
index a17606517df3c417233626a9c6f398b3822c43a1..d24e78ba7fb675de6b43a4f7ee1b6837739bbaa6 100644 (file)
@@ -42,7 +42,7 @@ REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
 void ApiListener::OnConfigLoaded(void)
 {
        /* set up SSL context */
-       shared_ptr<X509> cert = make_shared<X509>();
+       shared_ptr<X509> cert;
        try {
                cert = GetX509Certificate(GetCertPath());
        } catch (const std::exception&) {