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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Use NULL rather than 0.#778
Conversation
There was few cases of using literal 0 instead of NULL in the context of
pointers. While this was a legitimate C code, using NULL rather than 0 makes
the code clearer.
There was few cases of using literal 0 instead of NULL in the context ofpointers. While this was a legitimate C code, using NULL rather than 0 makesthe code clearer.
mention-bot commentedMar 23, 2017
@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified@loewis,@benjaminp and@warsaw to be potential reviewers. |
@@ -2179,7 +2179,7 @@ BOOL MyIsUserAnAdmin() | |||
// to leave the library loaded) | |||
if (0 == (shell32=LoadLibrary("shell32.dll"))) | |||
return FALSE; | |||
if (0 == (pfnIsUserAnAdmin=(PFNIsUserAnAdmin)GetProcAddress(shell32, "IsUserAnAdmin"))) | |||
if (NULL == (pfnIsUserAnAdmin=(PFNIsUserAnAdmin)GetProcAddress(shell32, "IsUserAnAdmin"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I find it interesting that we sometimes useNULL ==
and other times use== NULL
. I suppose it's not an inconsistency that matters a lot.