[Top] [All Lists]

Re: CodingStyle: while ((a=b))

To: "chas williams (contractor)" <chas@xxxxxxxxxxxxxxxx>
Subject: Re: CodingStyle: while ((a=b))
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Sat, 26 Jun 2004 18:25:04 -0700
Cc: "David S. Miller" <davem@xxxxxxxxxx>, shemminger@xxxxxxxx, netdev@xxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxx>
In-reply-to: <200406270120.i5R1KJiN010390@xxxxxxxxxxxxxxxxxxxxxxx>
References: <20040626234221.GB12761@xxxxxxxxxxxxxxxxxxxxx> <200406270120.i5R1KJiN010390@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, Jun 26, 2004 at 09:20:20PM -0400, chas williams (contractor) wrote:

> adding the != does not make the conditional clearer to me.  in fact
> it just make it harder to read.

so how about we stop merging these particular 'sparse cleanups' until
there is a consensus on how things should be done?

I'm no saying everyone should agree with me (even though you should)
just that consistency is good.

> however, it probably not a good idea to do assignments in places
> where someone might not expect to see them.

I'm not sure this has ever been a problem in the past has it?

Consider something like:

    while(*a++ = *b++);

I don't see how that's vague or ugly, and rewriting is just making it
worse IMO.


<Prev in Thread] Current Thread [Next in Thread>