Re: [Nagios-devel] [patch] Fix compiler warnings

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [patch] Fix compiler warnings

Post by Guest »

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: [email protected]
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






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