From 8aaf029ab6046eb8cbe600a548d176c1418bd99a Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 2 Oct 2020 14:42:30 -0400 Subject: add upstream 11.2 --- libcurl/curl_wrap.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libcurl') diff --git a/libcurl/curl_wrap.h b/libcurl/curl_wrap.h index 40a330ef..bc924713 100644 --- a/libcurl/curl_wrap.h +++ b/libcurl/curl_wrap.h @@ -148,12 +148,10 @@ std::wstring formatCurlStatusCode(CURLcode sc) void applyCurlOptions(CURL* easyHandle, const std::vector& options) //throw SysError { for (const CurlOption& opt : options) - { - const CURLcode rc = ::curl_easy_setopt(easyHandle, opt.option, opt.value); - if (rc != CURLE_OK) + if (const CURLcode rc = ::curl_easy_setopt(easyHandle, opt.option, opt.value); + rc != CURLE_OK) throw SysError(formatSystemError("curl_easy_setopt(" + numberTo(static_cast(opt.option)) + ")", formatCurlStatusCode(rc), utfTo(::curl_easy_strerror(rc)))); - } } } } -- cgit