From: Anatol Belski Date: Thu, 15 Feb 2018 22:08:14 +0000 (+0100) Subject: Reduce variable scope X-Git-Tag: php-7.3.0alpha1~410 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e52da475a024c0589613d5368b6e173cf2f260f;p=php Reduce variable scope --- diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 0ff7a42edd..5f0c497e44 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -130,7 +130,6 @@ PHP_FUNCTION(datefmt_parse) char* text_to_parse = NULL; size_t text_len =0; zval* z_parse_pos = NULL; - zend_long long_parse_pos; int32_t parse_pos = -1; DATE_FORMAT_METHOD_INIT_VARS; @@ -146,6 +145,7 @@ PHP_FUNCTION(datefmt_parse) DATE_FORMAT_METHOD_FETCH_OBJECT; if (z_parse_pos) { + zend_long long_parse_pos; ZVAL_DEREF(z_parse_pos); long_parse_pos = zval_get_long(z_parse_pos); if (ZEND_LONG_INT_OVFL(long_parse_pos)) { @@ -175,7 +175,6 @@ PHP_FUNCTION(datefmt_localtime) char* text_to_parse = NULL; size_t text_len =0; zval* z_parse_pos = NULL; - zend_long long_parse_pos; int32_t parse_pos = -1; DATE_FORMAT_METHOD_INIT_VARS; @@ -191,6 +190,7 @@ PHP_FUNCTION(datefmt_localtime) DATE_FORMAT_METHOD_FETCH_OBJECT; if (z_parse_pos) { + zend_long long_parse_pos; ZVAL_DEREF(z_parse_pos); long_parse_pos = zval_get_long(z_parse_pos); if (ZEND_LONG_INT_OVFL(long_parse_pos)) {