diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index b9f404ab113..b421c03757a 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -160,7 +160,7 @@ static int spl_ptr_heap_zval_max_cmp(zval *a, zval *b, zval *object TSRMLS_DC) { /* exception or call failure */ return 0; } - return lval > 0 ? 1 : -1; + return lval > 0 ? 1 : (lval < 0 ? -1 : 0); } } @@ -184,7 +184,7 @@ static int spl_ptr_heap_zval_min_cmp(zval *a, zval *b, zval *object TSRMLS_DC) { /* exception or call failure */ return 0; } - return lval > 0 ? 1 : -1; + return lval > 0 ? 1 : (lval < 0 ? -1 : 0); } } @@ -215,7 +215,7 @@ static int spl_ptr_pqueue_zval_cmp(zval *a, zval *b, zval *object TSRMLS_DC) { / /* exception or call failure */ return 0; } - return lval > 0 ? 1 : -1; + return lval > 0 ? 1 : (lval < 0 ? -1 : 0); } }