From 8517fc560ceaf471067f6e17e3ff7a699e661305 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:26:34 +0100 Subject: [PATCH] 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. --- Zend/zend_API.c | 2 +- Zend/zend_object_handlers.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c06d6119b7aff..eed953601bd6a 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4723,7 +4723,7 @@ ZEND_API zend_result zend_update_static_property_ex(zend_class_entry *scope, zen zend_class_entry *old_scope = EG(fake_scope); if (UNEXPECTED(!(scope->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { - if (UNEXPECTED(zend_update_class_constants(scope)) != SUCCESS) { + if (UNEXPECTED(zend_update_class_constants(scope) != SUCCESS)) { return FAILURE; } } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 923dce5972969..8553f1c4c517d 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1541,7 +1541,7 @@ ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend } if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { - if (UNEXPECTED(zend_update_class_constants(ce)) != SUCCESS) { + if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { return NULL; } }