lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<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

Powered by Openwall GNU/*/Linux Powered by OpenVZ