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 »


--Yylu36WmvOXNoKYn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 22, 2010 at 08:49:20AM +0200, Michael Friedrich said:
> 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.

You are quite likely correct. The calls to this that I could find
(although I may have missed some) appear to call it in void context, so
I didn't see much benefit in making it return ERROR instead of OK. I
agree that a better patch would make it return ERROR and also make the
callers always check the return code.

Cheers,
--=20
--------------------------------------------------------------------------
| Stephen Gran | Steal this tagline. I did. |
| [email protected] | |
| http://www.lobefin.net/~steve | |
--------------------------------------------------------------------------

--Yylu36WmvOXNoKYn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJMm7eFAAoJELMRjO+K6o/utXQP/2JcjRzY2OXzDk2bw0AEuO/n
EsasFM6PZIQRyMYOyJyDL/aXZtp4meDB4v7X56a8h9N79gROB3WJkjxXrnhXktQG
rB/oIDyVZAMHQ/+wS+EykEJoDE+gJmsjsNr8q7TF/2wBlPamiYiZxSexGePcHr68
RpBfbLHXHmS3lsuHefmFe9N005b16bwOgdmdBYYZoAQABdyx9Jsh8Jhq6PBnKkwh
JjskriLquCmdh15ezdDjSzLahLit196DYJ1o/LP1hoE5JH0F0k+PL3whHB9EPWFf
qX+oxCBpRACA6zY+dzjYpgFaJvk5OEgJ3IhJPk6tzxNKVnjz1XnoLrwHXraMQHUW
3mH3eB5Fk7jRRkEOJwIKrdabELFsBM6I1R7YFUyvC6GoV4leLWXZLzqdaXw8dd8s
kKOpcNFlCOgUDSbg5uqjVc33x0IsOhAobRD3NHPhWda+W5UjXqw7IlKbI3TFE93H
qpeZuFtW9STb13ZzR/W9WPzoWKNFjyFc2fpSzUk3flCn4zEWrnT+Q9/9LLqE6FuW
mzC1c/ReABxjDmiq3k9/Xiq6hX+vGeEkvZHBufLSvgIHVhCXJHWawoomk+YFdRhZ
nPhzXthgzGa4inGniPnqKhx688/3MRx8FKrpj0auYFdDLOXnG+wgqxFP7PeHN5bV
3gyJ8lwLZyIUexMxh7Gy
=47FH
-----END PGP SIGNATURE-----

--Yylu36WmvOXNoKYn--





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