| To: | Chris Wedgwood <cw@xxxxxxxx> |
|---|---|
| Subject: | Re: CodingStyle: while ((a=b)) |
| From: | "chas williams (contractor)" <chas@xxxxxxxxxxxxxxxx> |
| Date: | Sat, 26 Jun 2004 21:20:20 -0400 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxx>, shemminger@xxxxxxxx, netdev@xxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxx> |
| In-reply-to: | Message from Chris Wedgwood <cw@f00f.org> of "Sat, 26 Jun 2004 16:42:21 PDT." <20040626234221.GB12761@taniwha.stupidest.org> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
In message <20040626234221.GB12761@xxxxxxxxxxxxxxxxxxxxx>,Chris Wedgwood writes
:
> while ((a=b)) to while ((a=b) != 0)
adding the != does not make the conditional clearer to me. in fact
it just make it harder to read. however, it probably not a good
idea to do assignments in places where someone might not expect to
see them. the alternative something like this:
while (1) {
a = b;
if (a == 0)
break;
}
but its not very pretty either.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [2.6 patch] remove a superfluous #ifndef from net/ip.h, Adrian Bunk |
|---|---|
| Next by Date: | Re: CodingStyle: while ((a=b)), Chris Wedgwood |
| Previous by Thread: | CodingStyle: while ((a=b)), Chris Wedgwood |
| Next by Thread: | Re: CodingStyle: while ((a=b)), Chris Wedgwood |
| Indexes: | [Date] [Thread] [Top] [All Lists] |