[patch] Fix compiler warnings
Michael Friedrich
michael.friedrich at univie.ac.at
Wed Sep 22 08:49:20 CEST 2010
Hi,
Stephen Gran wrote:
> diff --git a/base/broker.c b/base/broker.c
> index 8c0bdd2..b90c79b 100644
> --- a/base/broker.c
> +++ b/base/broker.c
> @@ -184,10 +184,10 @@ int broker_event_handler(int type, int flags, int attr, int eventhandler_type, v
> int return_code=OK;
>
> if(!(event_broker_options& BROKER_EVENT_HANDLERS))
> - return;
> + return return_code;
>
> if(data==NULL)
> - return;
> + return return_code;
>
> /* get command name/args */
> if(cmd!=NULL){
>
I don't think this should be treated like this in regard of checking
data if NULL. Currently the return code not checked for OK|ERROR when
calling the function, but each call provides a void* typecasted svc or
hst for the data function param. In regard of continuous behavior I
would recommend changing that the way I proposed before - by returning
ERROR instead of OK, if data is NULL. see broker_host|service_check for
examples on returning return_code. It won't affect anything right now,
just keeping source clean.
Kind regards,
Michael
--
DI (FH) Michael Friedrich
Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria
email: michael.friedrich at univie.ac.at
phone: +43 1 4277 14359
fax: +43 1 4277 14279
web: http://www.univie.ac.at/zid
Icinga Core& IDOUtils Developer
http://www.icinga.org
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
More information about the Developers
mailing list