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/cgi/cgi_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sapi/cgi') diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 2cff48fc61..723bffc865 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -238,11 +238,8 @@ static void fcgi_log(int type, const char *format, ...) { } #endif -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