3 ms·
Even simple codebases that do if (!p) Anywhere would immediately cause problems.
by cyphar 8y ago
Even simple codebases that do
if (!p)
Anywhere would immediately cause problems.
- saagarjha 8y agoThis is legal in C, even if the representation for a null pointer is not actually "all zero bits" internally. The null pointer is defined to compare equal to 0, which is the contrapositive of what your test is doing.