Skip to content

Commit

Permalink
Simpler fix for #74974
Browse files Browse the repository at this point in the history
  • Loading branch information
pmmaga authored and sgolemon committed Jul 27, 2017
1 parent 9fcfe52 commit 34e5d3a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions Zend/zend_operators.c
Original file line number Diff line number Diff line change
Expand Up @@ -2151,16 +2151,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;
}
Expand All @@ -2171,16 +2161,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;
}
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ char *alloca();
#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))

Expand Down

0 comments on commit 34e5d3a

Please sign in to comment.