Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sbin/init
Christian Biere <christianbiere%gmx.de@localhost> 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@localhost
Home |
Main Index |
Thread Index |
Old Index