mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-03-03 13:51:47 -05:00
Fixes for Waddress
* check_snmp: Fix string comparison
This commit is contained in:
parent
a00c412e7b
commit
6d341c40ab
1 changed files with 5 additions and 3 deletions
|
|
@ -422,7 +422,8 @@ main (int argc, char **argv)
|
|||
}
|
||||
else if (strstr (response, "INTEGER: ")) {
|
||||
show = multiply (strstr (response, "INTEGER: ") + 9);
|
||||
if (fmtstr != "") {
|
||||
|
||||
if (strcmp(fmtstr, "") != 0) {
|
||||
conv = fmtstr;
|
||||
}
|
||||
}
|
||||
|
|
@ -596,8 +597,9 @@ main (int argc, char **argv)
|
|||
len = sizeof(perfstr)-strlen(perfstr)-1;
|
||||
strncat(perfstr, show, len>ptr-show ? ptr-show : len);
|
||||
|
||||
if (type)
|
||||
if (strcmp(type, "") != 0) {
|
||||
strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
|
||||
}
|
||||
|
||||
if (warning_thresholds) {
|
||||
strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1);
|
||||
|
|
@ -1185,7 +1187,7 @@ multiply (char *str)
|
|||
if(verbose>2)
|
||||
printf(" multiply extracted double: %f\n", val);
|
||||
val *= multiplier;
|
||||
if (fmtstr != "") {
|
||||
if (strcmp(fmtstr, "") != 0) {
|
||||
conv = fmtstr;
|
||||
}
|
||||
if (val == (int)val) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue