summaryrefslogtreecommitdiffstats
path: root/plugins/check_snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r--plugins/check_snmp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index c425df3..425bb7b 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -422,7 +422,8 @@ main (int argc, char **argv)
422 } 422 }
423 else if (strstr (response, "INTEGER: ")) { 423 else if (strstr (response, "INTEGER: ")) {
424 show = multiply (strstr (response, "INTEGER: ") + 9); 424 show = multiply (strstr (response, "INTEGER: ") + 9);
425 if (fmtstr != "") { 425
426 if (strcmp(fmtstr, "") != 0) {
426 conv = fmtstr; 427 conv = fmtstr;
427 } 428 }
428 } 429 }
@@ -596,8 +597,9 @@ main (int argc, char **argv)
596 len = sizeof(perfstr)-strlen(perfstr)-1; 597 len = sizeof(perfstr)-strlen(perfstr)-1;
597 strncat(perfstr, show, len>ptr-show ? ptr-show : len); 598 strncat(perfstr, show, len>ptr-show ? ptr-show : len);
598 599
599 if (type) 600 if (strcmp(type, "") != 0) {
600 strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1); 601 strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
602 }
601 603
602 if (warning_thresholds) { 604 if (warning_thresholds) {
603 strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1); 605 strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1);
@@ -1185,7 +1187,7 @@ multiply (char *str)
1185 if(verbose>2) 1187 if(verbose>2)
1186 printf(" multiply extracted double: %f\n", val); 1188 printf(" multiply extracted double: %f\n", val);
1187 val *= multiplier; 1189 val *= multiplier;
1188 if (fmtstr != "") { 1190 if (strcmp(fmtstr, "") != 0) {
1189 conv = fmtstr; 1191 conv = fmtstr;
1190 } 1192 }
1191 if (val == (int)val) { 1193 if (val == (int)val) {