Skip to content

Various return types and values consolidation #19418

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
Aug 12, 2025

Conversation

alexandre-daubois
Copy link
Member

No description provided.

Comment on lines 1207 to 1216
bool php_is_image_avif(php_stream* stream) {
bool php_is_image_avif(php_stream* stream) { /* {{{ php_is_image_avif */
struct php_avif_stream avif_stream;
avif_stream.stream = stream;

if (AvifInfoIdentifyStream(&avif_stream, php_avif_stream_read, php_avif_stream_skip) == kAvifInfoOk) {
return 1;
return true;
}
return 0;
return false;
}
/* }}} */
Copy link
Member

Choose a reason for hiding this comment

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

I would remove the {{{ marker all together if touching the function, and you can simplify this by just doing:

return AvifInfoIdentifyStream(&avif_stream, php_avif_stream_read, php_avif_stream_skip) == kAvifInfoOk;

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes of course 👍

@Girgias Girgias merged commit dfa1307 into php:master Aug 12, 2025
9 checks passed
@TimWolla
Copy link
Member

Probably makes sense to fix this in bulk with Coccinelle. See torvalds/linux@46b5c9b as an example.

@alexandre-daubois
Copy link
Member Author

Having a look. Thanks!

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.

3 participants