]> granicus.if.org Git - php/commitdiff
Remove return value from llist apply functions
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 15 Apr 2020 08:59:58 +0000 (10:59 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 15 Apr 2020 09:01:12 +0000 (11:01 +0200)
Unlike the hash apply functions, these do not return int.

Zend/zend_builtin_functions.c
sapi/cgi/cgi_main.c
sapi/cli/php_cli.c
sapi/fpm/fpm/fpm_main.c
sapi/phpdbg/phpdbg_prompt.c
sapi/phpdbg/phpdbg_utils.c

index 4753e9b7c1cb3a2b0faffd8af8f3135bb8bb74a5..111dfc019343eccdef7c489322c1ef2cdd3d351c 100644 (file)
@@ -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;
 
index 723bffc8658aaf57ea0ff26de485ddc2f849fad5..dfe595a97abf47e04945e189736b61a25ff8a26b 100644 (file)
@@ -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);
 }
 
index a5aafcd23171a0e2b78e9fa30bbb4e21bd46d293..d80b2fb95b676f4522538f60928cb1437a6ad4ca 100644 (file)
@@ -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;
 }
 /* }}} */
 
index 00102e6112e649af669842e2cd280f2f9d276ab1..c5e20b93da868929e7e73602e301e66195dd678e 100644 (file)
@@ -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);
 }
 /* }}} */
index a441d4d6ae88ad35756e4905cb800cfb151b6de8..3c26fa7ef4ff969a6279e32b3c1bbd677299bbb8 100644 (file)
@@ -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;
 }
 /* }}} */
 
index 1efad03a79317c8a2a2772874adab770631121f2..548c9e96b1c9b0a7aa557b1fd79bbc2ad1976d65 100644 (file)
@@ -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);