com php-src: fix the comparison return value: ext/spl/spl_hea p.c

From: Date: Wed, 29 Oct 2014 14:30:10 +0000
Subject: com php-src: fix the comparison return value: ext/spl/spl_hea p.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82856@lists.php.net to get a copy of this message
Commit: da1d0ee1bd8718cc5c10a010f1980bec7083d3fc Author: Anatol Belski <ab@php.net> Wed, 29 Oct 2014 11:48:29 +0100 Parents: 3a6db1e77a166914f4693bab274d1dbfecb5231b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da1d0ee1bd8718cc5c10a010f1980bec7083d3fc Log: fix the comparison return value Changed paths: M ext/spl/spl_heap.c Diff: diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index b9f404a..b421c03 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); } }

« previous php.cvs (#82856) next »