kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: ternary vs double exclamation
Date: Wed, 7 Jan 2015 22:37:07 -0800	[thread overview]
Message-ID: <20150108063707.GA3445@kroah.com> (raw)
In-Reply-To: <CANJa1ibfN90iNwKQNQjUwQcL2N8DVBF05WXpcew_pbi0_CzRmg@mail.gmail.com>

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?

  reply	other threads:[~2015-01-08  6:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30  0:25 ternary vs double exclamation Vinícius Tinti
2014-12-30  0:34 ` Max Filippov
2014-12-30  0:40   ` Vinícius Tinti
2014-12-30  1:00 ` Valdis.Kletnieks at vt.edu
2014-12-30  1:04   ` Vinícius Tinti
2015-01-03 23:54   ` John de la Garza
2015-01-04  4:20     ` Valdis.Kletnieks at vt.edu
2015-01-04 23:43       ` John de la Garza
2015-01-05  0:50         ` Greg KH
2015-01-08  4:46           ` John de la Garza
2015-01-08  6:37             ` Greg KH [this message]
2015-01-05  1:17         ` Valdis.Kletnieks at vt.edu
2015-01-08  4:58           ` John de la Garza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150108063707.GA3445@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).