diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-29 11:09:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-29 11:09:00 +0100 |
| commit | 77e38ac1c025b8431d1834a2c1059f9677c78ab1 (patch) | |
| tree | aa8dc016303530e56155826f355cb7e3c3a4ee94 /plugins/check_dns.c | |
| parent | 2eea6bb2a04bbfb169bac5f0f7c319f998e8ab87 (diff) | |
| parent | eead88edda047843b911afd7b63e7decfee306ce (diff) | |
| download | monitoring-plugins-77e38ac.tar.gz | |
Merge pull request #1953 from RincewindsHat/compiler_warnings-sign-compare
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 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++) { |
