Skip to content

Commit 8d21a6b

Browse files
nielsdoscmb69
authored andcommitted
Fix UNEXPECTED() paren mistakes.
This corrects the paren placement to the intended one. As these functions use zend_result, the success value is zero. Therefore this has no functional change. The only difference is that this now hints the compiler optimizer correctly. Closes GH-10364.
1 parent fd6c235 commit 8d21a6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4723,7 +4723,7 @@ ZEND_API zend_result zend_update_static_property_ex(zend_class_entry *scope, zen
47234723
zend_class_entry *old_scope = EG(fake_scope);
47244724

47254725
if (UNEXPECTED(!(scope->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) {
4726-
if (UNEXPECTED(zend_update_class_constants(scope)) != SUCCESS) {
4726+
if (UNEXPECTED(zend_update_class_constants(scope) != SUCCESS)) {
47274727
return FAILURE;
47284728
}
47294729
}

Zend/zend_object_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend
15411541
}
15421542

15431543
if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) {
1544-
if (UNEXPECTED(zend_update_class_constants(ce)) != SUCCESS) {
1544+
if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
15451545
return NULL;
15461546
}
15471547
}

0 commit comments

Comments
 (0)