Skip to content

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

Merged
bagder merged 2 commits intomasterfrom
bagder/checksrc-conditions
Apr 22, 2021
Merged

checksrc: complain on == NULL or != 0 checks in conditions #6912
bagder merged 2 commits intomasterfrom
bagder/checksrc-conditions

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 Compare April 21, 2021 07:15
bagder added 2 commits April 22, 2021 09:10
... 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 Compare April 22, 2021 07:10
@bagder bagder closed this in 063d3f3 Apr 22, 2021
@bagder bagder merged commit 52fab72 into master Apr 22, 2021
@bagder bagder deleted the bagder/checksrc-conditions branch April 22, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants