From mboxrd@z Thu Jan 1 00:00:00 1970 From: john@jjdev.com (John de la Garza) Date: Sun, 4 Jan 2015 18:43:22 -0500 Subject: ternary vs double exclamation In-Reply-To: <37532.1420345229@turing-police.cc.vt.edu> References: <170340.1419901208@turing-police.cc.vt.edu> <20150103235359.GA3588@vega.jjdev.com> <37532.1420345229@turing-police.cc.vt.edu> Message-ID: <20150104234321.GA9214@vega.jjdev.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sat, Jan 03, 2015 at 11:20:29PM -0500, Valdis.Kletnieks at vt.edu wrote: > On Sat, 03 Jan 2015 18:54:00 -0500, John de la Garza said: > > > It should not be assumed that true will always be 1 as defined in > > include/linux/stddef.h, right? > > No, I mean use an actual 'bool' type rather than 'int'. Consider this from > kernel/softirq.c: yes, bool has two possible values true and false from include/linux/stddef.h: enum { false = 0, true = 1 }; I assume it is a bad idea to depend on true being 1, right? I mean, I should assume that true could be changed to any non 0 value in the future, right?