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

Remove superfluous check from null_ptr_check #9

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

Conversation

niederha
Copy link

The null_ptr_check() function checks that dev.inft_ptr is not NULL, however, nowhere in the code it this pointer used.
Indeed dev.inf_ptr is only used in user defined functions: read, write and delay_us... hence if it is up to the user to use the pointer it should be up to the user to check it.

In the current state of things if the user doesn't want to use the pointer he would still have to assign it a value in order to pass the init, which is, imo, a bad practice.

Thus removing the check makes sense.

@niederha niederha changed the title Remove superfluous check form null_ptr_check Remove superfluous check from null_ptr_check Jun 10, 2021
@niederha
Copy link
Author

@boschsensortec Any update? I know this is but a detail, but it would help me clean some code to get this mr passer. And if it doesn't work for semantic reasons, I'd be curious to know why

@niederha niederha closed this Sep 16, 2021
@niederha niederha reopened this Sep 16, 2021
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.

1 participant