Skip to content

Commit 27e14c9

Browse files
committed
Drop comment and rename error1 var
1 parent 68c4bcf commit 27e14c9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ext/date/php_date.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ PHPAPI zend_long php_parse_date(const char *string, zend_long *now)
10091009
PHP_FUNCTION(strtotime)
10101010
{
10111011
zend_string *times;
1012-
int error1, epoch_does_not_fit_in_zend_long;
1012+
int parse_error, epoch_does_not_fit_in_zend_long;
10131013
timelib_error_container *error;
10141014
zend_long preset_ts, ts;
10151015
zend_bool preset_ts_is_null = 1;
@@ -1037,9 +1037,9 @@ PHP_FUNCTION(strtotime)
10371037

10381038
t = timelib_strtotime(ZSTR_VAL(times), ZSTR_LEN(times), &error,
10391039
DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
1040-
error1 = error->error_count;
1040+
parse_error = error->error_count;
10411041
timelib_error_container_dtor(error);
1042-
if (error1) {
1042+
if (parse_error) {
10431043
timelib_time_dtor(now);
10441044
timelib_time_dtor(t);
10451045
RETURN_FALSE;
@@ -1052,7 +1052,6 @@ PHP_FUNCTION(strtotime)
10521052
timelib_time_dtor(now);
10531053
timelib_time_dtor(t);
10541054

1055-
/* Seconds since epoch must fit in a zend_long */
10561055
if (epoch_does_not_fit_in_zend_long) {
10571056
php_error_docref(NULL, E_WARNING, "Epoch doesn't fit in a PHP integer");
10581057
RETURN_FALSE;
@@ -1130,7 +1129,6 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
11301129
/* Clean up and return */
11311130
ts = timelib_date_to_int(now, &epoch_does_not_fit_in_zend_long);
11321131

1133-
/* Seconds since epoch must fit in a zend_long */
11341132
if (epoch_does_not_fit_in_zend_long) {
11351133
timelib_time_dtor(now);
11361134
php_error_docref(NULL, E_WARNING, "Epoch doesn't fit in a PHP integer");
@@ -3336,7 +3334,6 @@ PHP_FUNCTION(date_timestamp_get)
33363334

33373335
timestamp = timelib_date_to_int(dateobj->time, &epoch_does_not_fit_in_zend_long);
33383336

3339-
/* Seconds since epoch must fit in a zend_long */
33403337
if (epoch_does_not_fit_in_zend_long) {
33413338
zend_value_error("Epoch doesn't fit in a PHP integer");
33423339
RETURN_THROWS();

0 commit comments

Comments
 (0)