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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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);