lkml.org 
[lkml]   [2004]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: (0 == foo), rather than (foo == 0)
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.

> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


--
Dr Peter Williams, Chief Scientist peterw@aurema.com
Aurema Pty Limited Tel:+61 2 9698 2322
PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174
79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com

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

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.101 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site