summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2017-11-04 22:08:10 +0000
committerJoe Watkins <krakjoe@php.net>2017-11-07 05:27:27 +0000
commitc189845951ad40dcb85105320829aeb4cbd82d58 (patch)
treeb72c6b567a1e6264aadb3eb04c8b9de114c583d8
parentf70ca770b657f2d0dfe2b44f369c266e1ae15ab2 (diff)
downloadphp-git-c189845951ad40dcb85105320829aeb4cbd82d58.tar.gz
date module, replacing abs call with the llabs's like one due to bigger type
-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 ab6c288943..3cf4dd789c 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 ? '-' : '+',
- abs(utc_offset / 3600),
- abs(((utc_offset % 3600) / 60)));
+ php_date_llabs(utc_offset / 3600),
+ php_date_llabs(((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 ? '-' : '+',
- abs(tzobj->tzi.utc_offset / 3600),
- abs(((tzobj->tzi.utc_offset % 3600) / 60)));
+ php_date_llabs(tzobj->tzi.utc_offset / 3600),
+ php_date_llabs(((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 ? '-' : '+',
- abs(utc_offset / 3600),
- abs(((utc_offset % 3600) / 60)));
+ php_date_llabs(utc_offset / 3600),
+ php_date_llabs(((utc_offset % 3600) / 60)));
RETURN_NEW_STR(tmpstr);
}