From 5d3337076b8dc8d4427a5c6259429972eab18db8 Mon Sep 17 00:00:00 2001 From: GITSRC <34047788+gitsrc@users.noreply.github.com> Date: Mon, 13 May 2019 16:21:46 +0800 Subject: [PATCH] Require semicolon after SAVE_CURL_ERROR() --- ext/curl/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.40.0