-
Notifications
You must be signed in to change notification settings - Fork 1k
replaced 0 with NULL (best practice for C) #7244
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7244 +/- ##
=======================================
Coverage 98.79% 98.79%
=======================================
Files 81 81
Lines 15254 15254
=======================================
Hits 15070 15070
Misses 184 184 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No obvious timing issues in HEAD=replace0withNULL Generated via commit d9f3f84 Download link for the artifact containing the test results: ↓ atime-results.zip
|
|
Could you please provide a reference for this |
|
A reference for the fact that I'm not sure where I would look for the specific guideline that specifies this, but |
|
in that case I am uncommonly ignorant :) |
|
Gustedt even advocates against NULL (and for C23 nullptr), but that
depends on the context (this isn't a variadic function call) and we're
not C23 yet:
https://inria.hal.science/hal-02383654v1/preview/ModernC.pdf#page=149
|
|
I'm not familiar with this document, but I do know that NULL is used elsewhere is the code. I still affirm my belief that using It would seem hard to believe that It specifies behavior and intent, while |
|
In fact the Google Guide recommends https://google.github.io/styleguide/cppguide.html#0_and_nullptr/NULL |
|
Yeah, that's not available in c99 |

No description provided.