diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 10:10:55 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 10:10:55 (GMT) |
commit | 07f9c438f31de7a280e43c4196a32d200ad41fbe (patch) | |
tree | 642bd4478a70665df23b83cb7b48770c3020c570 /plugins/check_dns.c | |
parent | 47cb10013e6935bb6cdf470925ea5a5f74464646 (diff) | |
download | monitoring-plugins-07f9c438f31de7a280e43c4196a32d200ad41fbe.tar.gz |
Fixes for -Wsign-compare
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r-- | plugins/check_dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 82dc264..5e20214 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++) { |