summaryrefslogtreecommitdiffstats
path: root/plugins/t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index ff0e55d..c0dce25 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -617,18 +617,22 @@ char *perfdata_uint64 (const char *label,
617 char *data = NULL; 617 char *data = NULL;
618 618
619 if (strpbrk (label, "'= ")) 619 if (strpbrk (label, "'= "))
620 xasprintf (&data, "'%s'=%ld%s;", label, val, uom); 620 xasprintf (&data, "'%s'=%ld%s", label, val, uom);
621 else 621 else
622 xasprintf (&data, "%s=%ld%s;", label, val, uom); 622 xasprintf (&data, "%s=%ld%s", label, val, uom);
623 xasprintf (&data, "%s;", data);
623 624
624 if (warnp) 625 if (warnp)
625 xasprintf (&data, "%s%lu;", data, warn); 626 xasprintf (&data, "%s%lu", data, warn);
627 xasprintf (&data, "%s;", data);
626 628
627 if (critp) 629 if (critp)
628 xasprintf (&data, "%s%lu;", data, crit); 630 xasprintf (&data, "%s%lu", data, crit);
631 xasprintf (&data, "%s;", data);
629 632
630 if (minp) 633 if (minp)
631 xasprintf (&data, "%s%lu", data, minv); 634 xasprintf (&data, "%s%lu", data, minv);
635 xasprintf (&data, "%s;", data);
632 636
633 if (maxp) 637 if (maxp)
634 xasprintf (&data, "%s;%lu", data, maxv); 638 xasprintf (&data, "%s;%lu", data, maxv);
@@ -652,18 +656,22 @@ char *perfdata_int64 (const char *label,
652 char *data = NULL; 656 char *data = NULL;
653 657
654 if (strpbrk (label, "'= ")) 658 if (strpbrk (label, "'= "))
655 xasprintf (&data, "'%s'=%ld%s;", label, val, uom); 659 xasprintf (&data, "'%s'=%ld%s", label, val, uom);
656 else 660 else
657 xasprintf (&data, "%s=%ld%s;", label, val, uom); 661 xasprintf (&data, "%s=%ld%s", label, val, uom);
662 xasprintf (&data, "%s;", data);
658 663
659 if (warnp) 664 if (warnp)
660 xasprintf (&data, "%s%ld;", data, warn); 665 xasprintf (&data, "%s%ld", data, warn);
666 xasprintf (&data, "%s;", data);
661 667
662 if (critp) 668 if (critp)
663 xasprintf (&data, "%s%ld;", data, crit); 669 xasprintf (&data, "%s%ld", data, crit);
670 xasprintf (&data, "%s;", data);
664 671
665 if (minp) 672 if (minp)
666 xasprintf (&data, "%s%ld", data, minv); 673 xasprintf (&data, "%s%ld", data, minv);
674 xasprintf (&data, "%s;", data);
667 675
668 if (maxp) 676 if (maxp)
669 xasprintf (&data, "%s;%ld", data, maxv); 677 xasprintf (&data, "%s;%ld", data, maxv);