summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-04-15 10:59:58 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-04-15 11:01:12 +0200
commitd68dfaf05e88b5962416a656d625f53bb0288236 (patch)
treeebfe646fb8f04f3e103417c509559272808205fa
parent90435637756fb8c473938853bc6d3ecfa9f2eeff (diff)
downloadphp-git-d68dfaf05e88b5962416a656d625f53bb0288236.tar.gz
Remove return value from llist apply functions
Unlike the hash apply functions, these do not return int.
-rw-r--r--Zend/zend_builtin_functions.c5
-rw-r--r--sapi/cgi/cgi_main.c5
-rw-r--r--sapi/cli/php_cli.c3
-rw-r--r--sapi/fpm/fpm/fpm_main.c5
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c3
-rw-r--r--sapi/phpdbg/phpdbg_utils.c1
6 files changed, 8 insertions, 14 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 4753e9b7c1..111dfc0193 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1674,11 +1674,10 @@ ZEND_FUNCTION(get_resources)
}
/* }}} */
-static int add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
+static void add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
{
zval *name_array = (zval *)arg;
add_next_index_string(name_array, ext->name);
- return 0;
}
/* }}} */
@@ -1695,7 +1694,7 @@ ZEND_FUNCTION(get_loaded_extensions)
array_init(return_value);
if (zendext) {
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t)add_zendext_info, return_value);
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) add_zendext_info, return_value);
} else {
zend_module_entry *module;
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 723bffc865..dfe595a97a 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -258,10 +258,9 @@ static void print_modules(void)
zend_hash_destroy(&sorted_registry);
}
-static int print_extension_info(zend_extension *ext, void *arg)
+static void print_extension_info(zend_extension *ext)
{
php_printf("%s\n", ext->name);
- return 0;
}
static int extension_name_cmp(const zend_llist_element **f, const zend_llist_element **s)
@@ -278,7 +277,7 @@ static void print_extensions(void)
zend_llist_copy(&sorted_exts, &zend_extensions);
sorted_exts.dtor = NULL;
zend_llist_sort(&sorted_exts, extension_name_cmp);
- zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL);
+ zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info);
zend_llist_destroy(&sorted_exts);
}
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index a5aafcd231..d80b2fb95b 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -195,10 +195,9 @@ static void print_modules(void) /* {{{ */
}
/* }}} */
-static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */
+static void print_extension_info(zend_extension *ext) /* {{{ */
{
php_printf("%s\n", ext->name);
- return ZEND_HASH_APPLY_KEEP;
}
/* }}} */
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 00102e6112..c5e20b93da 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -206,10 +206,9 @@ static void print_modules(void) /* {{{ */
}
/* }}} */
-static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */
+static void print_extension_info(zend_extension *ext) /* {{{ */
{
php_printf("%s\n", ext->name);
- return 0;
}
/* }}} */
@@ -228,7 +227,7 @@ static void print_extensions(void) /* {{{ */
zend_llist_copy(&sorted_exts, &zend_extensions);
sorted_exts.dtor = NULL;
zend_llist_sort(&sorted_exts, extension_name_cmp);
- zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL);
+ zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info);
zend_llist_destroy(&sorted_exts);
}
/* }}} */
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index a441d4d6ae..3c26fa7ef4 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1228,9 +1228,8 @@ static int add_module_info(zend_module_entry *module) /* {{{ */ {
}
/* }}} */
-static int add_zendext_info(zend_extension *ext) /* {{{ */ {
+static void add_zendext_info(zend_extension *ext) /* {{{ */ {
phpdbg_write("extension", "name=\"%s\"", "%s\n", ext->name);
- return 0;
}
/* }}} */
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c
index 1efad03a79..548c9e96b1 100644
--- a/sapi/phpdbg/phpdbg_utils.c
+++ b/sapi/phpdbg/phpdbg_utils.c
@@ -710,7 +710,6 @@ head_done:
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) {
element_dump_func(val, key, num);
} ZEND_HASH_FOREACH_END();
- zend_hash_apply_with_arguments(myht, (apply_func_args_t) element_dump_func, 0);
GC_UNPROTECT_RECURSION(myht);
if (Z_TYPE_P(zv) == IS_OBJECT) {
zend_release_properties(myht);