Re: [PATCH] Intel Manageability Engine Interface driver

Lennart Sorensen
2007-10-23T18:05:57Z

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