Skip to content

Commit 34e5d3a

Browse files
pmmagasgolemon
authored andcommitted
Simpler fix for #74974
1 parent 9fcfe52 commit 34e5d3a

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

Zend/zend_operators.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,16 +2151,6 @@ ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *
21512151

21522152
ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */
21532153
{
2154-
if (UNEXPECTED((Z_TYPE_P(op1) == IS_DOUBLE) && zend_isnan(Z_DVAL_P(op1)))) {
2155-
ZVAL_FALSE(result);
2156-
return SUCCESS;
2157-
}
2158-
2159-
if (UNEXPECTED((Z_TYPE_P(op2) == IS_DOUBLE) && zend_isnan(Z_DVAL_P(op2)))) {
2160-
ZVAL_FALSE(result);
2161-
return SUCCESS;
2162-
}
2163-
21642154
if (compare_function(result, op1, op2) == FAILURE) {
21652155
return FAILURE;
21662156
}
@@ -2171,16 +2161,6 @@ ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op
21712161

21722162
ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */
21732163
{
2174-
if (UNEXPECTED((Z_TYPE_P(op1) == IS_DOUBLE) && isnan(Z_DVAL_P(op1)))) {
2175-
ZVAL_FALSE(result);
2176-
return SUCCESS;
2177-
}
2178-
2179-
if (UNEXPECTED((Z_TYPE_P(op2) == IS_DOUBLE) && isnan(Z_DVAL_P(op2)))) {
2180-
ZVAL_FALSE(result);
2181-
return SUCCESS;
2182-
}
2183-
21842164
if (compare_function(result, op1, op2) == FAILURE) {
21852165
return FAILURE;
21862166
}

Zend/zend_portability.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ char *alloca();
433433
#define ZEND_STRL(str) (str), (sizeof(str)-1)
434434
#define ZEND_STRS(str) (str), (sizeof(str))
435435
#define ZEND_NORMALIZE_BOOL(n) \
436-
((n) ? (((n)>0) ? 1 : -1) : 0)
436+
((n) ? (((n)<0) ? -1 : 1) : 0)
437437
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
438438
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
439439

0 commit comments

Comments
 (0)