What does !!(x) mean in C (esp. the Linux kernel)?

!!(x) forces it to be either 0 or 1. 0 remains 0, but any non-zero value (which would be ‘true’ in a boolean context) becomes 1.

Leave a Comment