@@ -1010,10 +1010,10 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
1010
1010
const char * space = "" ;
1011
1011
const char * class_name = "" ;
1012
1012
const char * function ;
1013
- int origin_len ;
1013
+ size_t origin_len ;
1014
1014
char * origin ;
1015
1015
zend_string * message ;
1016
- int is_function = 0 ;
1016
+ bool is_function = false ;
1017
1017
1018
1018
/* get error text into buffer and escape for html if necessary */
1019
1019
zend_string * buffer = vstrpprintf (0 , format , args );
@@ -1045,23 +1045,23 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
1045
1045
switch (EG (current_execute_data )-> opline -> extended_value ) {
1046
1046
case ZEND_EVAL :
1047
1047
function = "eval" ;
1048
- is_function = 1 ;
1048
+ is_function = true ;
1049
1049
break ;
1050
1050
case ZEND_INCLUDE :
1051
1051
function = "include" ;
1052
- is_function = 1 ;
1052
+ is_function = true ;
1053
1053
break ;
1054
1054
case ZEND_INCLUDE_ONCE :
1055
1055
function = "include_once" ;
1056
- is_function = 1 ;
1056
+ is_function = true ;
1057
1057
break ;
1058
1058
case ZEND_REQUIRE :
1059
1059
function = "require" ;
1060
- is_function = 1 ;
1060
+ is_function = true ;
1061
1061
break ;
1062
1062
case ZEND_REQUIRE_ONCE :
1063
1063
function = "require_once" ;
1064
- is_function = 1 ;
1064
+ is_function = true ;
1065
1065
break ;
1066
1066
default :
1067
1067
function = "Unknown" ;
@@ -1077,9 +1077,9 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
1077
1077
1078
1078
/* if we still have memory then format the origin */
1079
1079
if (is_function ) {
1080
- origin_len = ( int ) spprintf (& origin , 0 , "%s%s%s(%s)" , class_name , space , function , params );
1080
+ origin_len = spprintf (& origin , 0 , "%s%s%s(%s)" , class_name , space , function , params );
1081
1081
} else {
1082
- origin_len = ( int ) spprintf (& origin , 0 , "%s" , function );
1082
+ origin_len = spprintf (& origin , 0 , "%s" , function );
1083
1083
}
1084
1084
1085
1085
if (PG (html_errors )) {
@@ -2093,13 +2093,13 @@ void dummy_invalid_parameter_handler(
2093
2093
unsigned int line ,
2094
2094
uintptr_t pReserved )
2095
2095
{
2096
- static int called = 0 ;
2096
+ static bool called = false ;
2097
2097
char buf [1024 ];
2098
2098
int len ;
2099
2099
2100
2100
if (!called ) {
2101
2101
if (PG (windows_show_crt_warning )) {
2102
- called = 1 ;
2102
+ called = true ;
2103
2103
if (function ) {
2104
2104
if (file ) {
2105
2105
len = _snprintf (buf , sizeof (buf )- 1 , "Invalid parameter detected in CRT function '%ws' (%ws:%u)" , function , file , line );
@@ -2110,7 +2110,7 @@ void dummy_invalid_parameter_handler(
2110
2110
len = _snprintf (buf , sizeof (buf )- 1 , "Invalid CRT parameter detected (function not known)" );
2111
2111
}
2112
2112
zend_error (E_WARNING , "%s" , buf );
2113
- called = 0 ;
2113
+ called = false ;
2114
2114
}
2115
2115
}
2116
2116
}
0 commit comments