1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Simplify always-true check in zend_generator_update_current (#13848)

`old_root` is dereferenced at top, so `old_root` must not be NULL, and
the check doesn't actually do anything.
This commit is contained in:
Niels Dossche
2024-04-01 13:29:09 +02:00
committed by GitHub
parent 30885f3b5f
commit c3f5bbde2a

View File

@@ -579,7 +579,7 @@ ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator
EG(current_execute_data) = original_execute_data;
if (!((old_root ? old_root : generator)->flags & ZEND_GENERATOR_CURRENTLY_RUNNING)) {
if (!(old_root->flags & ZEND_GENERATOR_CURRENTLY_RUNNING)) {
new_root->node.parent = NULL;
OBJ_RELEASE(&new_root_parent->std);
zend_generator_resume(generator);