Page 1 of 1

Re: [Nagios-devel] [PATCH

Posted: Fri Jan 07, 2011 11:55 am
by Guest
On 01/07/2011 12:47 PM, Michael Friedrich wrote:
> Andreas Ericsson wrote:
>> On 01/07/2011 09:24 AM, Michael Friedrich wrote:
>>> Andreas Ericsson wrote:
>>>> On 01/03/2011 03:13 PM, Carsten Emde wrote:
>>>>
>>>> Applied and pushed. Thanks
>>>>
>>> Nice patch, thanks. It contains several inline declarations which i have
>>> reworked while applying against Icinga CGIs. Attached is a git patch against
>>> current Nagios HEAD (from git.op5.org, thx for the mirror) resolving those
>>> things too.
>> This patch is kinda backwards. It's considered best practice to have the
>> variables declared inside the outmost block they're used, so as to prevent
>> value spilling when the code is next modified.
>
> It is?
>

Yes. It allows the compiler to optimize the code better and prevents bugs
caused by reusing variables.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]