@@ -1010,10 +1010,10 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
10101010 const char * space = "" ;
10111011 const char * class_name = "" ;
10121012 const char * function ;
1013- int origin_len ;
1013+ size_t origin_len ;
10141014 char * origin ;
10151015 zend_string * message ;
1016- int is_function = 0 ;
1016+ bool is_function = false ;
10171017
10181018 /* get error text into buffer and escape for html if necessary */
10191019 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
10451045 switch (EG (current_execute_data )-> opline -> extended_value ) {
10461046 case ZEND_EVAL :
10471047 function = "eval" ;
1048- is_function = 1 ;
1048+ is_function = true ;
10491049 break ;
10501050 case ZEND_INCLUDE :
10511051 function = "include" ;
1052- is_function = 1 ;
1052+ is_function = true ;
10531053 break ;
10541054 case ZEND_INCLUDE_ONCE :
10551055 function = "include_once" ;
1056- is_function = 1 ;
1056+ is_function = true ;
10571057 break ;
10581058 case ZEND_REQUIRE :
10591059 function = "require" ;
1060- is_function = 1 ;
1060+ is_function = true ;
10611061 break ;
10621062 case ZEND_REQUIRE_ONCE :
10631063 function = "require_once" ;
1064- is_function = 1 ;
1064+ is_function = true ;
10651065 break ;
10661066 default :
10671067 function = "Unknown" ;
@@ -1077,9 +1077,9 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
10771077
10781078 /* if we still have memory then format the origin */
10791079 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 );
10811081 } else {
1082- origin_len = ( int ) spprintf (& origin , 0 , "%s" , function );
1082+ origin_len = spprintf (& origin , 0 , "%s" , function );
10831083 }
10841084
10851085 if (PG (html_errors )) {
@@ -2093,13 +2093,13 @@ void dummy_invalid_parameter_handler(
20932093 unsigned int line ,
20942094 uintptr_t pReserved )
20952095{
2096- static int called = 0 ;
2096+ static bool called = false ;
20972097 char buf [1024 ];
20982098 int len ;
20992099
21002100 if (!called ) {
21012101 if (PG (windows_show_crt_warning )) {
2102- called = 1 ;
2102+ called = true ;
21032103 if (function ) {
21042104 if (file ) {
21052105 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(
21102110 len = _snprintf (buf , sizeof (buf )- 1 , "Invalid CRT parameter detected (function not known)" );
21112111 }
21122112 zend_error (E_WARNING , "%s" , buf );
2113- called = 0 ;
2113+ called = false ;
21142114 }
21152115 }
21162116}
0 commit comments