[pan2] Unneeded detour via C-type strings



commit 46f97aa3fc440ff4744033a448cc4cf5b433b44e
Author: Rhialto <rhialto falu nl>
Date:   Sun Mar 6 00:01:15 2016 +0100

    Unneeded detour via C-type strings

 pan/data/cert-store.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pan/data/cert-store.cc b/pan/data/cert-store.cc
index 7616087..3c2b71c 100644
--- a/pan/data/cert-store.cc
+++ b/pan/data/cert-store.cc
@@ -338,8 +338,8 @@ bool CertStore::add(gnutls_x509_crt_t cert, const Quark& server) {
 
        std::stringstream buffer;
        buffer << addr << ".pem";
-       cert_file_name = buffer.str().c_str();
-       cert_file_name_wp = file::absolute_fn("ssl_certs", cert_file_name.c_str()).c_str();
+       cert_file_name = buffer.str();
+       cert_file_name_wp = file::absolute_fn("ssl_certs", cert_file_name);
 
        FILE * fp = fopen(cert_file_name_wp.c_str(), "wb"); 
        if (!fp)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]