02-03-2009, 11:25 AM
The interpretation, as expounded by lundin, is correct. The rule is intended to apply to all tests against 0 and this inclues testing pointers against NULL.
The rationale for this rule is to make a clear distinction between types that are being interpreted as Booleans (flags) and another other types.
The rationale for this rule is to make a clear distinction between types that are being interpreted as Booleans (flags) and another other types.
Posted by and on behalf of the MISRA C Working Group