Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
SjuulJanssen
on Aug 5, 2012
|
parent
|
context
|
favorite
| on:
NASA JPL C Coding Standard [pdf]
"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; }
vbtemp
on Aug 5, 2012
|
next
[–]
Because the whole point is to be maximally explicit and not implicit.
jbester
on Aug 5, 2012
|
prev
[–]
It's one of the MISRA rules - implicit comparisons aren't allowed.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Why not: if (!c_assert(p >= 0)) { return ERROR; }