diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-18 09:02:44 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-19 17:10:59 (GMT) |
commit | 062432a6bc1f334f17200a88a04d3c8e02a4fd94 (patch) | |
tree | 8304c27c4d72b82ccc4faccfe313ae51c3ea3ece /Source/cmCurl.cxx | |
parent | 96c38493849f05724ec5c2b2e0152c5c86c3b5b0 (diff) | |
download | CMake-062432a6bc1f334f17200a88a04d3c8e02a4fd94.zip CMake-062432a6bc1f334f17200a88a04d3c8e02a4fd94.tar.gz CMake-062432a6bc1f334f17200a88a04d3c8e02a4fd94.tar.bz2 |
cmCurlSetCAInfo: use std::string as argument
Diffstat (limited to 'Source/cmCurl.cxx')
-rw-r--r-- | Source/cmCurl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index fa001d2..28ee24d 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -31,11 +31,11 @@ } \ } while (false) -std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile) +std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile) { std::string e; - if (cafile && *cafile) { - ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); + if (!cafile.empty()) { + ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile.c_str()); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } #ifdef CMAKE_FIND_CAFILE |