Skip to content
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

elfloader: make check more intuitive #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

axel-h
Copy link
Member

@axel-h axel-h commented Mar 22, 2024

This has been extracted from a bigger patchset to improve the code maintainability/extendability.

if (initialise_devices_non_boot()) {
if (0 != initialise_devices_non_boot()) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't find this more intuitive. The return type of initialise_devices_non_boot is currently int, but it is only used as bool. Should we not change it to bool instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

You have a point here. The current scheme allows returning different error codes, I can make this even more clear and then also print the code in the message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants