Comment on NASA JPL C Coding Standard [pdf]Comments−SjuulJanssen14y"A recommended use of assertions is to follow the following pattern:" if (!c_assert(p >= 0) == true) { return ERROR; }Why not: if (!c_assert(p >= 0)) { return ERROR; }−vbtemp14yBecause the whole point is to be maximally explicit and not implicit.−jbester14yIt's one of the MISRA rules - implicit comparisons aren't allowed.
Comments
"A recommended use of assertions is to follow the following pattern:" if (!c_assert(p >= 0) == true) { return ERROR; }
Why not: if (!c_assert(p >= 0)) { return ERROR; }
Because the whole point is to be maximally explicit and not implicit.
It's one of the MISRA rules - implicit comparisons aren't allowed.