Skip to content

Commit a580d4a

Browse files
committed
main/php_ini.c: use size_t type instead of int
This does unnecessary conversions
1 parent e54f564 commit a580d4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/php_ini.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static void php_load_zend_extension_cb(void *arg) { }
395395
#endif
396396
/* }}} */
397397

398-
static void append_ini_path(char *php_ini_search_path, int search_path_size, const char *path)
398+
static void append_ini_path(char *php_ini_search_path, size_t search_path_size, const char *path)
399399
{
400400
static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 };
401401

@@ -432,7 +432,7 @@ int php_init_config(void)
432432
php_ini_search_path = sapi_module.php_ini_path_override;
433433
free_ini_search_path = 0;
434434
} else if (!sapi_module.php_ini_ignore) {
435-
int search_path_size;
435+
size_t search_path_size;
436436
char *default_location;
437437
char *env_location;
438438
#ifdef PHP_WIN32
@@ -478,7 +478,7 @@ int php_init_config(void)
478478
* Prepare search path
479479
*/
480480

481-
search_path_size = MAXPATHLEN * 4 + (int)strlen(env_location) + 3 + 1;
481+
search_path_size = MAXPATHLEN * 4 + strlen(env_location) + 3 + 1;
482482
php_ini_search_path = (char *) emalloc(search_path_size);
483483
free_ini_search_path = 1;
484484
php_ini_search_path[0] = 0;

0 commit comments

Comments
 (0)