On Mon, Nov 10, 2003 at 02:46:37PM +0100, Duncan Sands wrote:
> > > The first step would to create a tools that find statemenst like
> > > if ( (A=b)<0 ). I have played with a grep pipeline and found only
> > > a few lines of code. perhaps somebody can make a tool that will show
> > > automaticly such kind of code.
>
> What is wrong with "if ( (A=b)< 0)"? Did you find any incorrect uses of
> this kind of construct in the kernel? By the way, this is just a specific
> example of a more common situation: statements with side effects.
It's doing two things in one statement. That's not conducive to readable
code. Look:
A = b;
if (A < 0)
can be read faster than
if ((A = b) < 0)
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
|