[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B42E252.1080405@gmail.com>
Date: Tue, 05 Jan 2010 07:55:14 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Stevens <dlstevens@...ibm.com>
CC: Flavio Leitner <fbl@...close.org>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
netdev-owner@...r.kernel.org
Subject: Re: [PATCH] igmp: fix ip_mc_sf_allow race
Le 05/01/2010 01:06, David Stevens a écrit :
> For readability, instead of:
>
> ret = X;
> if (condition)
> goto out;
>
> I prefer:
>
> if (condition) {
> ret = X;
> goto out;
> }
>
> which makes it clear that ret is for the return and not
> some random state change unrelated to the condition.
>
Linus argument for this common Linux coding style is that generated code is smaller
mov $-6,%eax
cmp condition
je out
versus
cmp condition
jne .ok
mov $-6,%eax
jmp out
.ok:
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists