eyfugq
Last Updated: February 25, 2016
·
1.105K
· mlafeldt

Normalize return code to 0 or 1 in C

c

In C, a more idiomatic way to say

return errors ? 1 : 0

is

return !!errors

But please do not encrypt your return codes further.