Skip to content

Commit 054523d

Browse files
committed
Drop explicit comparisons to != 0
1 parent b96e3c0 commit 054523d

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

Zend/zend_vm_def.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4158,11 +4158,11 @@ ZEND_VM_HOT_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL,OBSERVER))
41584158

41594159
const uint32_t no_discard = RETURN_VALUE_USED(opline) ? 0 : ZEND_ACC_NODISCARD;
41604160

4161-
if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_DEPRECATED|no_discard)) != 0)) {
4162-
if ((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0) {
4161+
if (UNEXPECTED(fbc->common.fn_flags & (ZEND_ACC_DEPRECATED|no_discard))) {
4162+
if (fbc->common.fn_flags & ZEND_ACC_DEPRECATED) {
41634163
zend_deprecated_function(fbc);
41644164
}
4165-
if ((fbc->common.fn_flags & no_discard) != 0 && EG(exception) == NULL) {
4165+
if ((fbc->common.fn_flags & no_discard) && EG(exception) == NULL) {
41664166
zend_nodiscard_function(fbc);
41674167
}
41684168
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -4269,11 +4269,11 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER))
42694269

42704270
const uint32_t no_discard = RETURN_VALUE_USED(opline) ? 0 : ZEND_ACC_NODISCARD;
42714271

4272-
if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_DEPRECATED|no_discard)) != 0)) {
4273-
if ((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0) {
4272+
if (UNEXPECTED(fbc->common.fn_flags & (ZEND_ACC_DEPRECATED|no_discard))) {
4273+
if (fbc->common.fn_flags & ZEND_ACC_DEPRECATED) {
42744274
zend_deprecated_function(fbc);
42754275
}
4276-
if ((fbc->common.fn_flags & no_discard) != 0 && EG(exception) == NULL) {
4276+
if ((fbc->common.fn_flags & no_discard) && EG(exception) == NULL) {
42774277
zend_nodiscard_function(fbc);
42784278
}
42794279
if (UNEXPECTED(EG(exception) != NULL)) {

Zend/zend_vm_execute.h

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)