From caa630a7fe8fb6cb0905a4b77b497cbc90f9a5bc Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 7 Nov 2017 14:52:12 +0000 Subject: Revert "date module, replacing abs call with the llabs's like one due to bigger type" This reverts commit c189845951ad40dcb85105320829aeb4cbd82d58. --- ext/date/php_date.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 3cf4dd789c..ab6c288943 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2290,8 +2290,8 @@ static HashTable *date_object_get_properties(zval *object) /* {{{ */ ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", utc_offset < 0 ? '-' : '+', - php_date_llabs(utc_offset / 3600), - php_date_llabs(((utc_offset % 3600) / 60))); + abs(utc_offset / 3600), + abs(((utc_offset % 3600) / 60))); ZVAL_NEW_STR(&zv, tmpstr); } @@ -2382,8 +2382,8 @@ static HashTable *date_object_get_properties_timezone(zval *object) /* {{{ */ ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", tzobj->tzi.utc_offset < 0 ? '-' : '+', - php_date_llabs(tzobj->tzi.utc_offset / 3600), - php_date_llabs(((tzobj->tzi.utc_offset % 3600) / 60))); + abs(tzobj->tzi.utc_offset / 3600), + abs(((tzobj->tzi.utc_offset % 3600) / 60))); ZVAL_NEW_STR(&zv, tmpstr); } @@ -3912,8 +3912,8 @@ PHP_FUNCTION(timezone_name_get) ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", utc_offset < 0 ? '-' : '+', - php_date_llabs(utc_offset / 3600), - php_date_llabs(((utc_offset % 3600) / 60))); + abs(utc_offset / 3600), + abs(((utc_offset % 3600) / 60))); RETURN_NEW_STR(tmpstr); } -- cgit v1.2.1