Skip to content

Commit d68dfaf

Browse files
committed
Remove return value from llist apply functions
Unlike the hash apply functions, these do not return int.
1 parent 9043563 commit d68dfaf

File tree

6 files changed

+8
-14
lines changed

6 files changed

+8
-14
lines changed

Zend/zend_builtin_functions.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,11 +1674,10 @@ ZEND_FUNCTION(get_resources)
16741674
}
16751675
/* }}} */
16761676

1677-
static int add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
1677+
static void add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
16781678
{
16791679
zval *name_array = (zval *)arg;
16801680
add_next_index_string(name_array, ext->name);
1681-
return 0;
16821681
}
16831682
/* }}} */
16841683

@@ -1695,7 +1694,7 @@ ZEND_FUNCTION(get_loaded_extensions)
16951694
array_init(return_value);
16961695

16971696
if (zendext) {
1698-
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t)add_zendext_info, return_value);
1697+
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) add_zendext_info, return_value);
16991698
} else {
17001699
zend_module_entry *module;
17011700

sapi/cgi/cgi_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,9 @@ static void print_modules(void)
258258
zend_hash_destroy(&sorted_registry);
259259
}
260260

261-
static int print_extension_info(zend_extension *ext, void *arg)
261+
static void print_extension_info(zend_extension *ext)
262262
{
263263
php_printf("%s\n", ext->name);
264-
return 0;
265264
}
266265

267266
static int extension_name_cmp(const zend_llist_element **f, const zend_llist_element **s)
@@ -278,7 +277,7 @@ static void print_extensions(void)
278277
zend_llist_copy(&sorted_exts, &zend_extensions);
279278
sorted_exts.dtor = NULL;
280279
zend_llist_sort(&sorted_exts, extension_name_cmp);
281-
zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL);
280+
zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info);
282281
zend_llist_destroy(&sorted_exts);
283282
}
284283

sapi/cli/php_cli.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,9 @@ static void print_modules(void) /* {{{ */
195195
}
196196
/* }}} */
197197

198-
static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */
198+
static void print_extension_info(zend_extension *ext) /* {{{ */
199199
{
200200
php_printf("%s\n", ext->name);
201-
return ZEND_HASH_APPLY_KEEP;
202201
}
203202
/* }}} */
204203

sapi/fpm/fpm/fpm_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,9 @@ static void print_modules(void) /* {{{ */
206206
}
207207
/* }}} */
208208

209-
static int print_extension_info(zend_extension *ext, void *arg) /* {{{ */
209+
static void print_extension_info(zend_extension *ext) /* {{{ */
210210
{
211211
php_printf("%s\n", ext->name);
212-
return 0;
213212
}
214213
/* }}} */
215214

@@ -228,7 +227,7 @@ static void print_extensions(void) /* {{{ */
228227
zend_llist_copy(&sorted_exts, &zend_extensions);
229228
sorted_exts.dtor = NULL;
230229
zend_llist_sort(&sorted_exts, extension_name_cmp);
231-
zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL);
230+
zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info);
232231
zend_llist_destroy(&sorted_exts);
233232
}
234233
/* }}} */

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,9 +1228,8 @@ static int add_module_info(zend_module_entry *module) /* {{{ */ {
12281228
}
12291229
/* }}} */
12301230

1231-
static int add_zendext_info(zend_extension *ext) /* {{{ */ {
1231+
static void add_zendext_info(zend_extension *ext) /* {{{ */ {
12321232
phpdbg_write("extension", "name=\"%s\"", "%s\n", ext->name);
1233-
return 0;
12341233
}
12351234
/* }}} */
12361235

sapi/phpdbg/phpdbg_utils.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,6 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) {
710710
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) {
711711
element_dump_func(val, key, num);
712712
} ZEND_HASH_FOREACH_END();
713-
zend_hash_apply_with_arguments(myht, (apply_func_args_t) element_dump_func, 0);
714713
GC_UNPROTECT_RECURSION(myht);
715714
if (Z_TYPE_P(zv) == IS_OBJECT) {
716715
zend_release_properties(myht);

0 commit comments

Comments
 (0)