summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2017-11-07 14:52:12 +0000
committerRemi Collet <remi@php.net>2017-11-07 15:58:55 +0100
commitcaa630a7fe8fb6cb0905a4b77b497cbc90f9a5bc (patch)
tree5109daa53a025850973911e137993ec440d6e983
parent7beb96ee4c994d7aaa27caa7e32baa540dfc90a6 (diff)
downloadphp-git-caa630a7fe8fb6cb0905a4b77b497cbc90f9a5bc.tar.gz
Revert "date module, replacing abs call with the llabs's like one due to bigger type"
This reverts commit c189845951ad40dcb85105320829aeb4cbd82d58.
-rw-r--r--ext/date/php_date.c12
1 files 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);
}