summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 5c93068..db2fde8 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2700,12 +2700,14 @@ private:
#endif
#define check_curl_result(result, errstr) \
- if (result != CURLE_OK) { \
- std::string e(errstr); \
- e += ::curl_easy_strerror(result); \
- this->SetError(e); \
- return false; \
- }
+ do { \
+ if (result != CURLE_OK) { \
+ std::string e(errstr); \
+ e += ::curl_easy_strerror(result); \
+ this->SetError(e); \
+ return false; \
+ } \
+ } while (false)
bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
{