summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2017-07-27 10:04:59 -0400
committerSara Golemon <pollita@php.net>2017-07-27 10:04:59 -0400
commit4a6ef8327a5b2e0bc51f833df200b7508030eede (patch)
tree7cb0ef1c9c93ebeb3cbe6e68878d6ebc616af925
parent262aeb8ae1dbe5d45c6c3d109535a19acad7da9c (diff)
parentb62fb3aa0c7968b9f478df355b18b7343efe87e0 (diff)
downloadphp-git-4a6ef8327a5b2e0bc51f833df200b7508030eede.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Simpler fix for #74974
-rw-r--r--Zend/zend_operators.c20
-rw-r--r--Zend/zend_portability.h2
2 files changed, 1 insertions, 21 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index a19990e605..ffc4dcc9a2 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2174,16 +2174,6 @@ ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *
ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
- if (UNEXPECTED((Z_TYPE_P(op1) == IS_DOUBLE) && zend_isnan(Z_DVAL_P(op1)))) {
- ZVAL_FALSE(result);
- return SUCCESS;
- }
-
- if (UNEXPECTED((Z_TYPE_P(op2) == IS_DOUBLE) && zend_isnan(Z_DVAL_P(op2)))) {
- ZVAL_FALSE(result);
- return SUCCESS;
- }
-
if (compare_function(result, op1, op2) == FAILURE) {
return FAILURE;
}
@@ -2194,16 +2184,6 @@ ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op
ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
- if (UNEXPECTED((Z_TYPE_P(op1) == IS_DOUBLE) && isnan(Z_DVAL_P(op1)))) {
- ZVAL_FALSE(result);
- return SUCCESS;
- }
-
- if (UNEXPECTED((Z_TYPE_P(op2) == IS_DOUBLE) && isnan(Z_DVAL_P(op2)))) {
- ZVAL_FALSE(result);
- return SUCCESS;
- }
-
if (compare_function(result, op1, op2) == FAILURE) {
return FAILURE;
}
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 893633fe45..ec140b3f54 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -476,7 +476,7 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
- ((n) ? (((n)>0) ? 1 : -1) : 0)
+ ((n) ? (((n)<0) ? -1 : 1) : 0)
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))