summaryrefslogtreecommitdiff
path: root/Zend/zend_ini.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-11-17 21:35:22 +0100
committerAnatol Belski <ab@php.net>2017-11-17 22:38:44 +0100
commit80d6eb6806a6317c99a2608e28f42869c834d0e7 (patch)
tree2b50e7efc4de4ad81d777b4d5bcc54ef4ff196e7 /Zend/zend_ini.c
parent3ce1a977d42d3e74912be381c326faf0b6126206 (diff)
downloadphp-git-80d6eb6806a6317c99a2608e28f42869c834d0e7.tar.gz
Fix unsigned comparisons and remove dead code
Fix unsigned comparison Cleanup never executed block Fix unsigned comparison Fix unsigned comparison, diff can't be < 0 Fix unsigned comparison Fix unsigned comparison Remove dead code
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r--Zend/zend_ini.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index bf36c1f7b5..129c782499 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -189,7 +189,12 @@ static int ini_key_compare(const void *a, const void *b) /* {{{ */
s = (const Bucket *) b;
if (!f->key && !s->key) { /* both numeric */
- return ZEND_NORMALIZE_BOOL(f->h - s->h);
+ if (f->h > s->h) {
+ return -1;
+ } else if (f->h < s->h) {
+ return 1;
+ }
+ return 0;
} else if (!f->key) { /* f is numeric, s is not */
return -1;
} else if (!s->key) { /* s is numeric, f is not */