cgi: Fix null pointer reference in getcgi.c language selection

Reported as issue 434 to tracker.nagios.org, this only happens on
solaris, where the printf() family functions aren't helpful enough
to replace NULL pointers with the string NULL rather than bombing
out.

While at it, we rename the input parameter so it doesn't collide
with a typename we want to use.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2701 5f96b256-904b-4d8d-8c98-d829582c6739
libfanout: stash next pointer

Stash next pointer for entry when iterating over a linked list in
the "obviously correct" fanout lib.

The next pointer is lost when freeing the entry item in a for loop...
A penny^H^H^H^H^Hpointer saved is a pointer earned, as my grandma used
to say.

Signed-off-by: Max Sikström <msikstrom@op5.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2702 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-runcmd: Make it build with new runcmd flags

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2703 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-nsutils: Update to use the defined functions

Way back I intended to give these utils a common prefix, and the
prefix lived on in the tests but not in the commit that actually
introduced the commit. Bad, bad Andreas...

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2704 5f96b256-904b-4d8d-8c98-d829582c6739
Add lib/test-fanout.c

It's obvious that even obviously correct code sometimes has really
obvious bugs, so obviously we need some sort of testing to make
sure the obviously correct code does the obviously correct thing.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2705 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-kvvec: Add a test for kvvec_capacity

It was the last untested function of the kvvec library, so now we
have full coverage there. Neato.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2706 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-iobroker: Also test iobroker_is_registered()

We run the test on removal and addition, which means we now test
to make sure the iobroker handles internal state exactly as
intended.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2707 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-dkhash: Flesh out with more tests

The counter-functions, among other things.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2708 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-bitmap: Flesh out bitmap tests a bit

More precise tests for intersections and a lot more coverage, for
example. If bitmap_unset() and bitmap_clear() fail, the config
parsing will be severely fouled up.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2709 5f96b256-904b-4d8d-8c98-d829582c6739