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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 17 May 2014 22:04:35 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	Peter Senna Tschudin <peter.senna@...il.com>
Cc:	dan.carpenter@...cle.com, kernel-janitors@...r.kernel.org,
	kernelnewbies@...nelnewbies.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] Remove useless return variables

Peter Senna Tschudin <peter.senna@...il.com> writes:

> This patch remove variables that are initialized with a constant,
> are never updated, and are only used as parameter of return.
> Return the constant instead of using a variable.

This ret variable pattern is pretty standard in Linux, as it makes it 
easier to add new code that may trigger new errors
(using the usual "goto forest" error handling pattern)

I don't see any benefit in whole-sale removing it. The compiler
doesn't care about it and will generate the same code in any 
case.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ