summaryrefslogtreecommitdiffstats
path: root/Source/cmCurl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCurl.cxx')
-rw-r--r--Source/cmCurl.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
index 0482898..0004f66 100644
--- a/Source/cmCurl.cxx
+++ b/Source/cmCurl.cxx
@@ -14,11 +14,13 @@
#endif
#define check_curl_result(result, errstr) \
- if ((result) != CURLE_OK && (result) != CURLE_NOT_BUILT_IN) { \
- e += e.empty() ? "" : "\n"; \
- e += (errstr); \
- e += ::curl_easy_strerror(result); \
- }
+ do { \
+ if ((result) != CURLE_OK && (result) != CURLE_NOT_BUILT_IN) { \
+ e += e.empty() ? "" : "\n"; \
+ e += (errstr); \
+ e += ::curl_easy_strerror(result); \
+ } \
+ } while (false)
std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile)
{