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]
Message-ID: <20071023180547.GL4003@csclub.uwaterloo.ca>
Date:	Tue, 23 Oct 2007 14:05:48 -0400
From:	lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Anas Nashif <nashif@...ux.intel.com>,
	linux-kernel@...r.kernel.org, Marek Dabek <marek.dabek@...el.com>
Subject: Re: [PATCH] Intel Manageability Engine Interface driver

On Tue, Oct 23, 2007 at 09:23:33AM -0700, Arjan van de Ven wrote:
> gcc will tell you in the other direction just as well.
> 
> and people read from left to right (at least in english) so coding in
> that direction is generally preferred in the Linux kernel as well.

What does gcc have to say about if (foo = 0){ rather than if (foo == 0){

Both are legal C so it shouldn't say anything.  Of course the first is
usually a bug (or very bad style).

On the other hand if (0 = foo) will give an error.

It isn't about how you read in english, it is about not making mistakes.
And why can't you say if 0 is equal to the variable foo rather than if
the variable foo is equal to 0?  Both are valid english, so that is just
a crappy excuse for sticking with a bad idea.

--
Len Sorensen
-
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