[monitoring-plugins] Fix fallout of the previous changes
RincewindsHat
git at monitoring-plugins.org
Sun Oct 29 11:10:12 CET 2023
Module: monitoring-plugins
Branch: master
Commit: 81f3b4165146eedd2da60afc5677ec44a0db9829
Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
Date: Thu Oct 19 12:20:27 2023 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=81f3b41
Fix fallout of the previous changes
---
plugins/check_apt.c | 2 +-
plugins/check_http.c | 2 +-
plugins/check_snmp.c | 4 ++--
plugins/check_tcp.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index 290c88e..5c0f6e2 100644
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
@@ -252,7 +252,7 @@ int process_arguments (int argc, char **argv) {
/* run an apt-get upgrade */
int run_upgrade(int *pkgcount, int *secpkgcount, char ***pkglist, char ***secpkglist){
- int i=0, result=STATE_UNKNOWN, regres=0, pc=0, spc=0;
+ int result=STATE_UNKNOWN, regres=0, pc=0, spc=0;
struct output chld_out, chld_err;
regex_t ireg, ereg, sreg;
char *cmdline=NULL, rerrbuf[64];
diff --git a/plugins/check_http.c b/plugins/check_http.c
index b9d8145..110f118 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -471,7 +471,7 @@ bool process_arguments (int argc, char **argv)
free(http_method);
http_method = strdup (optarg);
char *tmp;
- if ((tmp = strstr(http_method, ":")) > 0) {
+ if ((tmp = strstr(http_method, ":")) != NULL) {
tmp[0] = '\0';
http_method = http_method;
http_method_proxy = ++tmp;
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 01bee23..7ee9d0c 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -263,7 +263,7 @@ main (int argc, char **argv)
previous_string = strdup((char *) previous_state->data);
while((ap = strsep(&previous_string, ":")) != NULL) {
if(verbose>2)
- printf("State for %d=%s\n", i, ap);
+ printf("State for %zd=%s\n", i, ap);
while (i >= previous_size) {
previous_size += OID_COUNT_STEP;
previous_value = realloc(previous_value, previous_size * sizeof(*previous_value));
@@ -415,7 +415,7 @@ main (int argc, char **argv)
break;
if (verbose > 2) {
- printf("Processing oid %i (line %i)\n oidname: %s\n response: %s\n", i+1, line+1, oidname, response);
+ printf("Processing oid %zi (line %zi)\n oidname: %s\n response: %s\n", i+1, line+1, oidname, response);
}
/* Clean up type array - Sol10 does not necessarily zero it out */
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index c103612..054f1a3 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -275,7 +275,7 @@ main (int argc, char **argv)
}
printf("server_expect_count: %d\n", (int)server_expect_count);
for(size_t i = 0; i < server_expect_count; i++)
- printf("\t%d: %s\n", i, server_expect[i]);
+ printf("\t%zd: %s\n", i, server_expect[i]);
}
/* if(len) later on, we know we have a non-NULL response */
More information about the Commits
mailing list