diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_nt.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/check_nt.c b/plugins/check_nt.c index cac826f..1bdddc4 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c | |||
@@ -355,19 +355,18 @@ int main(int argc, char **argv){ | |||
355 | if (allRight) | 355 | if (allRight) |
356 | { | 356 | { |
357 | /* Let's format the output string, finally... */ | 357 | /* Let's format the output string, finally... */ |
358 | |||
359 | if (strstr(description, "%") == NULL) { | 358 | if (strstr(description, "%") == NULL) { |
360 | asprintf (&output_message, "%s = %.2f %s", description, counter_value, counter_unit); | 359 | asprintf (&output_message, "%s = %.2f %s", description, counter_value, counter_unit); |
361 | } else { | 360 | } else { |
362 | /* has formatting, will segv if wrong */ | 361 | /* has formatting, will segv if wrong */ |
363 | asprintf (&output_message, description, counter_value); | 362 | asprintf (&output_message, description, counter_value); |
364 | } | 363 | } |
365 | output_message = strcat (output_message, "|"); | 364 | asprintf (&output_message, "%s |", output_message); |
366 | output_message = strcat (output_message, | 365 | asprintf (&output_message,"%s %s", output_message, |
367 | fperfdata (description, counter_value, counter_unit, | 366 | fperfdata (description, counter_value, |
368 | 1, warning_value, 1, critical_value, | 367 | counter_unit, 1, warning_value, 1, critical_value, |
369 | (!(isPercent) && (minval != NULL)), fminval, | 368 | (!(isPercent) && (minval != NULL)), fminval, |
370 | (!(isPercent) && (minval != NULL)), fmaxval)); | 369 | (!(isPercent) && (minval != NULL)), fmaxval)); |
371 | } | 370 | } |
372 | } | 371 | } |
373 | 372 | ||