Skip to content

Commit 02aef23

Browse files
Minor updates on types
1 parent 98e0dbc commit 02aef23

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

main/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ 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;
10161016
int is_function = 0;
@@ -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
}

main/php_content_types.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,17 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
4141
/* }}} */
4242

4343
/* {{{ php_startup_sapi_content_types */
44-
int php_startup_sapi_content_types(void)
44+
void php_startup_sapi_content_types(void)
4545
{
4646
sapi_register_default_post_reader(php_default_post_reader);
4747
sapi_register_treat_data(php_default_treat_data);
4848
sapi_register_input_filter(php_default_input_filter, NULL);
49-
return SUCCESS;
5049
}
5150
/* }}} */
5251

5352
/* {{{ php_setup_sapi_content_types */
54-
int php_setup_sapi_content_types(void)
53+
void php_setup_sapi_content_types(void)
5554
{
5655
sapi_register_post_entries(php_post_entries);
57-
58-
return SUCCESS;
5956
}
6057
/* }}} */

main/php_content_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader);
2323
SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler);
24-
int php_startup_sapi_content_types(void);
25-
int php_setup_sapi_content_types(void);
24+
void php_startup_sapi_content_types(void);
25+
void php_setup_sapi_content_types(void);
2626

2727
#endif /* PHP_CONTENT_TYPES_H */

0 commit comments

Comments
 (0)