summaryrefslogtreecommitdiffstats
path: root/plugins/utils.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2021-10-26 18:47:28 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2021-10-26 18:47:28 (GMT)
commit73ed8109e5ba1c61f8ba435fd4324318d0751f18 (patch)
tree437e52bb8bf22d514646efbaf406edd025abdd2f /plugins/utils.c
parent6e0586c8e35c3990631f73d8cdb89b70751994c3 (diff)
downloadmonitoring-plugins-73ed8109e5ba1c61f8ba435fd4324318d0751f18.tar.gz
Re-add separation semicolons for perfdata, which I deleted
Diffstat (limited to 'plugins/utils.c')
-rw-r--r--plugins/utils.c24
1 files changed, 16 insertions, 8 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);