From: GITSRC <34047788+gitsrc@users.noreply.github.com> Date: Mon, 13 May 2019 08:21:46 +0000 (+0800) Subject: Require semicolon after SAVE_CURL_ERROR() X-Git-Tag: php-7.4.0alpha1~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d3337076b8dc8d4427a5c6259429972eab18db8;p=php Require semicolon after SAVE_CURL_ERROR() --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 8f695d339c..5b6e5f814c 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -107,8 +107,8 @@ static ZEND_ATTRIBUTE_UNUSED unsigned long php_curl_ssl_id(void) static void _php_curl_close_ex(php_curl *ch); static void _php_curl_close(zend_resource *rsrc); - -#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err; +#define SAVE_CURL_ERROR(__handle, __err) \ + do { (__handle)->err.no = (int) __err; } while (0) #define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s) - 1, (zend_long) v); #define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s) - 1, (double) v); @@ -147,7 +147,7 @@ static int php_curl_option_str(php_curl *ch, zend_long option, const char *str, } #endif - SAVE_CURL_ERROR(ch, error) + SAVE_CURL_ERROR(ch, error); return error == CURLE_OK ? SUCCESS : FAILURE; }