[Nagios-devel] [PATCH] ndoutils: adjust signedness of iterator

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

[Nagios-devel] [PATCH] ndoutils: adjust signedness of iterator

Post by Guest »


--7iMSBzlTiPOCCT2k
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

ndomod_sink_buffer_init() and ndomod_sink_buffer_deinit want to iterate
over sbuf->maxitems which is an unsigned long. Adjust the type of the
iterator variable to match this type.

--7iMSBzlTiPOCCT2k
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="ndoutils-ndomod-iterator-signedness.01.patch"

------------------------------------------------------------------------
r67 | aldot | 2009-04-01 14:16:42 +0200 (Wed, 01 Apr 2009) | 3 lines

- fix warning about camparison between signed and unsigned.
sbuf->maxitems is an unsigned long, so adjust it's iterator variable accordingly

------------------------------------------------------------------------

Index: src/ndomod.c
===================================================================
--- src/ndomod.c (revision 66)
+++ src/ndomod.c (revision 67)
@@ -882,7 +882,7 @@ int ndomod_load_unprocessed_data(char *f

/* initializes sink buffer */
int ndomod_sink_buffer_init(ndomod_sink_buffer *sbuf,unsigned long maxitems){
- int x;
+ unsigned long x;

if(sbuf==NULL || maxitems<=0)
return NDO_ERROR;
@@ -906,7 +906,7 @@ int ndomod_sink_buffer_init(ndomod_sink_

/* deinitializes sink buffer */
int ndomod_sink_buffer_deinit(ndomod_sink_buffer *sbuf){
- int x;
+ unsigned long x;

if(sbuf==NULL)
return NDO_ERROR;

--7iMSBzlTiPOCCT2k--





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