mirror of
https://github.com/php/php-src.git
synced 2024-12-23 08:49:39 +08:00
fix the comparison return value
This commit is contained in:
parent
3a6db1e77a
commit
da1d0ee1bd
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user