Re: [Nagios-devel] [patch] Fix compiler warnings
Posted: Thu Sep 23, 2010 7:22 pm
--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, Sep 22, 2010 at 09:19:18AM +0200, Michael Friedrich said:
> Hi,
>=20
> Instead of adding another function doing pretty much the same, but
> without any variable arguments on the function call, you might have a
> look at Andreas Ericsson's patch by checking fmt for NULL, and
> replacing the string literal by NULL.
>=20
> http://git.op5.org/git/?p=3Dnagios.git; ... 2e2fe22b3=
6601181d138acbba27e3a
>=20
> It's nicely resolved and keeps the upstream clean for other NULL'ed
> arguments.
Hi,
Oh, I didn't notice that one when looking at this. I thought about
doing something very similar (but mine used strlen instead of a NULL
check), but in the end I opted for a separate function because I prefer
to not abuse variadic functions with NULL input. YMMV, of course - both
are valid, this is just my preference.
Cheers,
--=20
--------------------------------------------------------------------------
| Stephen Gran | An optimist believes we live in the |
| [email protected] | best world possible; a pessimist fears |
| http://www.lobefin.net/~steve | this is true. |
--------------------------------------------------------------------------
--Dxnq1zWXvFF0Q93v
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)
iQIcBAEBCAAGBQJMm7cGAAoJELMRjO+K6o/uzJIQAJbyHQiLTkpmCMlelbDsKEab
JP6jzzynnF8anuUlT0knThO1sI/QnOb0jhnYCXSGycXeCJyCt/XKDKfsAcbvRXjm
4i2zGy3COmQG4YqoDm3l4N05bgPclYG+66Xp3yC1caPX+BBUmSvM1GDNxb2/Kg71
RWVaDMV/NuYwfa4rw9L98sOZlK9u+/NHlJWzI0DRB7byvmhKporyHjrJc+TW1wNu
d9SK1WpSnKy5KtxXZrRp5tfrswrm0u6qd3i+XwZp8ITkreGHMS+/rq/4BDdFs8P4
SbJOSJR3WYVIlTF/FJmhpqYT7pLG9efwo6UsotHk/LLMObBvhUZuUbnqipZZ9FSF
5piSbKRiTDA9VWBe4cZLxYNfFXCXhWpz0oE3deFcT75+1FI87ogYY9RBLZflgPJ0
cJgYoCvPT+WE3+2AeUY0Um7ht7zvzEnvsQAqpeZ277jUs9JJlqZ90iB0iWyUuZjk
ZQPxsglIfTKSUXl/MU0GOEVDBH3b5W6vWHnicOWSpj4jd3xmORAyS94on6isFi0J
Vyo25sFpH9W9ys/VErUGFijLtMnZEqTN5FQRJonNHkGew8DxsfCpgIDmKjy6lQp7
g8qAsi/I8gHy831PrTzBkJy+QS2Y6q+4RzC7qEsJd/YvszdwPtV13mMsN/ncpoEO
ka6KPcuP+oniPsa9DzuZ
=TZkO
-----END PGP SIGNATURE-----
--Dxnq1zWXvFF0Q93v--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]