summaryrefslogtreecommitdiffstats
path: root/plugins/check_dns.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-19 12:10:55 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-19 12:10:55 +0200
commit07f9c438f31de7a280e43c4196a32d200ad41fbe (patch)
tree642bd4478a70665df23b83cb7b48770c3020c570 /plugins/check_dns.c
parent47cb10013e6935bb6cdf470925ea5a5f74464646 (diff)
downloadmonitoring-plugins-07f9c43.tar.gz
Fixes for -Wsign-compare
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r--plugins/check_dns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 82dc264a..5e20214c 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -122,7 +122,7 @@ main (int argc, char **argv)
122 } 122 }
123 123
124 /* scan stdout */ 124 /* scan stdout */
125 for(i = 0; i < chld_out.lines; i++) { 125 for(size_t i = 0; i < chld_out.lines; i++) {
126 if (addresses == NULL) 126 if (addresses == NULL)
127 addresses = malloc(sizeof(*addresses)*10); 127 addresses = malloc(sizeof(*addresses)*10);
128 else if (!(n_addresses % 10)) 128 else if (!(n_addresses % 10))
@@ -197,7 +197,7 @@ main (int argc, char **argv)
197 } 197 }
198 198
199 /* scan stderr */ 199 /* scan stderr */
200 for(i = 0; i < chld_err.lines; i++) { 200 for(size_t i = 0; i < chld_err.lines; i++) {
201 if (verbose) 201 if (verbose)
202 puts(chld_err.line[i]); 202 puts(chld_err.line[i]);
203 203
@@ -241,7 +241,7 @@ main (int argc, char **argv)
241 unsigned long expect_match = (1 << expected_address_cnt) - 1; 241 unsigned long expect_match = (1 << expected_address_cnt) - 1;
242 unsigned long addr_match = (1 << n_addresses) - 1; 242 unsigned long addr_match = (1 << n_addresses) - 1;
243 243
244 for (i=0; i<expected_address_cnt; i++) { 244 for (int i=0; i<expected_address_cnt; i++) {
245 int j; 245 int j;
246 /* check if we get a match on 'raw' ip or cidr */ 246 /* check if we get a match on 'raw' ip or cidr */
247 for (j=0; j<n_addresses; j++) { 247 for (j=0; j<n_addresses; j++) {