On Tue, 2023-12-19 at 15:16 -0800, Jeff Johnson wrote: > On 12/19/2023 2:43 PM, Johannes Berg wrote: > > On Tue, 2023-12-19 at 14:41 -0800, Jeff Johnson wrote: > > > now the code can return a value that doesn't map to the true/false bool > > > enums > > > > No, it cannot, at least not if 'bool' is implemented in a C99-compliant > > way :) It's not actually an enum, it will return 0/1 in the machine > > register even with this code. > > Today I learned something new. Guess I'm still carrying baggage from > pre-C99. Which is not necessarily bad - there are to this day compilers that implement bool as if it was an enum, and then it can hold values other than 0/1 ... but at least for kernel work we can assume bool is implemented as specified :) johannes