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

checksrc: complain on == NULL or != 0 checks in conditions #6912

Merged
merged 2 commits into from Apr 22, 2021

Conversation

@bagder
Copy link
Member

@bagder bagder commented Apr 19, 2021

makes these boolean conditional checks consistent throughout the code base. Use if(!var) to check for == NULL and if(var) to check for != 0.

@bagder bagder added the tidy-up label Apr 19, 2021
@bagder bagder force-pushed the bagder/checksrc-conditions branch from 553df23 to da38cd0 Apr 21, 2021
bagder added 2 commits Apr 22, 2021
... remove '== NULL' and '!= 0'

Closes #6912
... to make them all consistenly use if(!var) and if(var)

Also added a few missing warnings to the documentation.

Closes #6912
@bagder bagder force-pushed the bagder/checksrc-conditions branch from da38cd0 to 52fab72 Apr 22, 2021
@bagder bagder closed this in 063d3f3 Apr 22, 2021
@bagder bagder merged commit 52fab72 into master Apr 22, 2021
46 of 51 checks passed
Loading
@bagder bagder deleted the bagder/checksrc-conditions branch Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants