From 33ef3d64dac366733f2af40d5bce2bac4e5bca1e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 4 Mar 2020 12:35:49 +0100 Subject: Use separate typedef for bucket comparison function Avoid performing the same casting dance inside each sort compare function. --- sapi/cli/php_cli.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sapi/cli/php_cli.c') diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 8cc570f132..a5aafcd231 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -173,11 +173,8 @@ const opt_struct OPTIONS[] = { {'-', 0, NULL} /* end of args */ }; -static int module_name_cmp(const void *a, const void *b) /* {{{ */ +static int module_name_cmp(Bucket *f, Bucket *s) /* {{{ */ { - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - return strcasecmp(((zend_module_entry *)Z_PTR(f->val))->name, ((zend_module_entry *)Z_PTR(s->val))->name); } -- cgit v1.2.1