Re: (0 == foo), rather than (foo == 0)

From: Richard B. Johnson
Date: Wed Mar 10 2004 - 13:33:44 EST


On Wed, 10 Mar 2004, Randy.Dunlap wrote:

> On Wed, 10 Mar 2004 11:46:40 +0530 Godbole, Amarendra \(GE Consumer &
> Industrial\) wrote:
>
> Hi,
>
> While writing code, the assignment operator (=) is many-a-times
> confused with the comparison operator (==) resulting in very subtle
> bugs difficult to track. To keep a check on this -- the constant
> can be written on the LHS rather than the RHS which will result
> in a compile time error if wrong operator is used.
>

People who develop kernel code know the difference between
'==' and '=' and are never confused my them. If you make
contributions to kernel code, and write: "if (0==foo)", your
code will be reviewed until it is obsolete and never find
its way into the kernel. Please don't insult kernel developers
with this kind of kid-stuff.

People who develop kernel code also know what a line-warp is.
They put a '\n' "[Enter] key" in their text every so-often,
maybe every 70 to 79 characters...

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


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