Subject: Re: CVS commit: src/sbin/init
To: Christian Biere <christianbiere@gmx.de>
From: Perry E. Metzger <perry@piermont.com>
List: source-changes
Date: 02/06/2007 10:51:48
Christian Biere <christianbiere@gmx.de> writes:
> David Laight wrote:
>
>> There is absolutely nothing wrong woth functions having multiple 'return'
>> statments in order to save the human reader having to parse the rest of
>
> That cannot be generalized. This has to be decided on a case-by-case basis
Sure, but in this case, it seemed more clear with returns in the code.
> and in many cases either option has no advantage over the other. The
> disadvantage of multiple return statements are:
>
> * more code
more _source_ code. :)
> * variables exist in scopes in which they are not used.
> * can easily cause resource leaks
A good reason to run Coverity over the code. :)
Either way, this is not so important to fight over I think.
--
Perry E. Metzger perry@piermont.com