Skip to content

Use an explicit failure check for zend_result functions in the scanner #10688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

nielsdos
Copy link
Member

Small cleanup.
Instead of an implicit check, use an explicit failure check.

(A check against != SUCCESS would probably result in slightly nicer assembly, but I doubt that matters at all and it doesn't seem to be the style.)

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@iluuu1994
Copy link
Member

A check against != SUCCESS would probably result in slightly nicer assembly

Would actually also be more accurate to what the code is currently doing, but I checked and exit_nesting does only return zend_result.

@nielsdos
Copy link
Member Author

I can change them, I don't have a preference myself. Shall I change both?

@iluuu1994
Copy link
Member

Sure, let's change it then.

@nielsdos
Copy link
Member Author

Updated. Thx.

@iluuu1994 iluuu1994 merged commit 91857cc into php:master Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants