]> granicus.if.org Git - php/commitdiff
Revert "date module, replacing abs call with the llabs's like one due to bigger type"
authorDerick Rethans <github@derickrethans.nl>
Tue, 7 Nov 2017 14:52:12 +0000 (14:52 +0000)
committerDerick Rethans <github@derickrethans.nl>
Tue, 7 Nov 2017 14:52:12 +0000 (14:52 +0000)
This reverts commit c189845951ad40dcb85105320829aeb4cbd82d58.

ext/date/php_date.c

index 3cf4dd789c07f3e7dc760142f8c322f82afcf236..ab6c2889435939e36d36e5533c2b12939737a85f 100644 (file)
@@ -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);
                        }