status.cgi segfault without hostgroup parameter on solaris 10
Andreas Ericsson
ae at op5.se
Wed Oct 20 19:32:45 CEST 2010
On 10/20/2010 04:32 PM, Ton Voon wrote:
>
> On 4 Oct 2010, at 07:41, Michael Friedrich wrote:
>
>> Ethan Galstad wrote:
>>> Michael Friedrich wrote:
>>>
>>>> Since it's rather trivial to fix, I decided to create a patch for
>>>> Nagios
>>>> too. Attached GIT diff against latest HEAD resolves those issues,
>>>> changing behavior to 'all' when no parameters are provided.
>
> Just a small note: the git diff you provided used different tab
> spacings, which makes it a bit more awkward to apply. Could you use
> the same syntax when providing a diff?
>
> Andreas, Ethan: we discussed some syntax cleansing tool. I use
> perltidy for Opsview (primarily perl code) and it helps all developers
> to adhere to the same coding standards. Is there an equivalent in the
> C world?
>
There is the aeons-old, fairly-much-used and very-nearly standard gnu
"indent" program. It's awesome, but for one thing; It can't be told to
indent with tabs and do continuation indentation with spaces.
It's not much use to check in huge re-indent patches when we haven't
even agreed on HOW to indent though.
Personally, I vote for Linux kernel style, which is basically like so
int main(int argc, char **argv)
{
void *ptr;
ptr = malloc(some_value);
if (!ptr && !(some_value ^ some_other_value)) {
take(action, with, params, and, stuff);
} else {
errors += error_diff(!something);
}
}
That is, basically:
- asterisks end up with the variable name
- spaces between C keywords and opening parentheses
- no space between function calls and opening parentheses
- no space after opening parentheses
- no space before closing parentheses
- else cuddles with curly braces
- indent is one tab per level
- space always follow comma
- space surrounds arithmetic, logical and bitwise operators
- tabs are 8 spaces wide
Unless anybody whines before november 10, I'll make this happen,
with the caveat that continuation indentation will be with tabs
instead of spaces (though gods know I'd prefer it the other way
around).
--
Andreas Ericsson andreas.ericsson at op5.se
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.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
More information about the Developers
mailing list