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

From: Randy.Dunlap
Date: Wed Mar 10 2004 - 19:23:22 EST


On Thu, 11 Mar 2004 10:00:56 +1100 Peter Williams wrote:

| Richard B. Johnson wrote:
| > 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.
|
| And you never make typing mistakes? That's admirable or should I say
| incredible.

Whoa. stop the presses. an on-$subejct posting.

Please, let's kill all the other fuss about email crapola...

--
~Randy
-
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/