lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Jul 2006 05:51:10 +0200
From:	ricknu-0@...dent.ltu.se
To:	Josef Sipek <jsipek@....cs.sunysb.edu>
Cc:	Paul Jackson <pj@....com>, linux-kernel@...r.kernel.org,
	akpm@...l.org, jeff@...zik.org, adobriyan@...il.com,
	vlobanov@...akeasy.net, jengelh@...ux01.gwdg.de,
	getshorty_@...mail.com, pwil3058@...pond.net.au, mb@...sch.de,
	penberg@...helsinki.fi, stefanr@...6.in-berlin.de,
	larsbj@...lik.net
Subject: Re: [RFC][PATCH] A generic boolean (version 6)

Citerar Josef Sipek <jsipek@....cs.sunysb.edu>:

> On Wed, Jul 26, 2006 at 06:06:22PM -0700, Paul Jackson wrote:
> > Richard wrote:
> > > * removed the #undef false/true and #define false/true
> > 
> > Good - thanks.
> > 
> > +enum {
> > +	false	= 0,
> > +	true	= 1
> > +};
> 
> You probably have said it before, but why do we need this?

Well Jeff, there is no _need_ for the false and true, but it makes the code more
readable to many of us. (Why else is there all these definitions of false and true?)
There is other opinions on this and that is one of the reason* bool isn't
defined as:

enum { false, true } bool;

letting us choose our own way.
So when (hopefully) the converting to these starts, it will only affect the
files already using some sort of false and true. If the author is more
comfortable with 0 and 1's, that will be respectet (by me, at least).

Hope it make some sense.

> Josef "Jeff" Sipek.

/Richard Knutsson

PS
If I got you wrong and you meant why it can't be defined where it is used, I
refere you to Andrew's mail "[patch 1/1] consolidate TRUE and FALSE", where a
redefinition occured (of TRUE/FALSE).
DS

* another is that C99 defines the boolean type for us (as _Bool).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ