diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-10-26 20:47:28 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-10-26 20:47:28 +0200 |
commit | 73ed8109e5ba1c61f8ba435fd4324318d0751f18 (patch) | |
tree | 437e52bb8bf22d514646efbaf406edd025abdd2f /plugins | |
parent | 6e0586c8e35c3990631f73d8cdb89b70751994c3 (diff) | |
download | monitoring-plugins-73ed8109e5ba1c61f8ba435fd4324318d0751f18.tar.gz |
Re-add separation semicolons for perfdata, which I deleted
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/utils.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index ff0e55d4..c0dce255 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -617,18 +617,22 @@ char *perfdata_uint64 (const char *label, char *data = NULL; if (strpbrk (label, "'= ")) - xasprintf (&data, "'%s'=%ld%s;", label, val, uom); + xasprintf (&data, "'%s'=%ld%s", label, val, uom); else - xasprintf (&data, "%s=%ld%s;", label, val, uom); + xasprintf (&data, "%s=%ld%s", label, val, uom); + xasprintf (&data, "%s;", data); if (warnp) - xasprintf (&data, "%s%lu;", data, warn); + xasprintf (&data, "%s%lu", data, warn); + xasprintf (&data, "%s;", data); if (critp) - xasprintf (&data, "%s%lu;", data, crit); + xasprintf (&data, "%s%lu", data, crit); + xasprintf (&data, "%s;", data); if (minp) xasprintf (&data, "%s%lu", data, minv); + xasprintf (&data, "%s;", data); if (maxp) xasprintf (&data, "%s;%lu", data, maxv); @@ -652,18 +656,22 @@ char *perfdata_int64 (const char *label, char *data = NULL; if (strpbrk (label, "'= ")) - xasprintf (&data, "'%s'=%ld%s;", label, val, uom); + xasprintf (&data, "'%s'=%ld%s", label, val, uom); else - xasprintf (&data, "%s=%ld%s;", label, val, uom); + xasprintf (&data, "%s=%ld%s", label, val, uom); + xasprintf (&data, "%s;", data); if (warnp) - xasprintf (&data, "%s%ld;", data, warn); + xasprintf (&data, "%s%ld", data, warn); + xasprintf (&data, "%s;", data); if (critp) - xasprintf (&data, "%s%ld;", data, crit); + xasprintf (&data, "%s%ld", data, crit); + xasprintf (&data, "%s;", data); if (minp) xasprintf (&data, "%s%ld", data, minv); + xasprintf (&data, "%s;", data); if (maxp) xasprintf (&data, "%s;%ld", data, maxv); |