From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Wed, 7 Jan 2015 22:37:07 -0800 Subject: ternary vs double exclamation In-Reply-To: References: <170340.1419901208@turing-police.cc.vt.edu> <20150103235359.GA3588@vega.jjdev.com> <37532.1420345229@turing-police.cc.vt.edu> <20150104234321.GA9214@vega.jjdev.com> <20150105005058.GA15400@kroah.com> Message-ID: <20150108063707.GA3445@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Jan 07, 2015 at 08:46:52PM -0800, John de la Garza wrote: > On Sun, Jan 04, 2015 at 04:50:58PM -0800, Greg KH wrote: > > On Sun, Jan 04, 2015 at 06:43:22PM -0500, John de la Garza wrote: > > > 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? > > > > Why would that matter?? Just always test for "true" and "false" and you > > will be fine. > > > > What if you need to store the value in a bitmap that needs > to be 1 or 0 so they can be shifted/anded in? Then you don't use a boolean if you are worried about it, come on, why is this even a discussion?