Skip to content

Commit

Permalink
Revert "date module, replacing abs call with the llabs's like one due…
Browse files Browse the repository at this point in the history
… to bigger type"

This reverts commit c189845.
  • Loading branch information
derickr committed Nov 7, 2017
1 parent 22b6ab3 commit 466a34d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ext/date/php_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 466a34d

Please sign in to comment.