[monitoring-plugins] homogenize perfdata function and fix small bug ...

RincewindsHat git at monitoring-plugins.org
Thu Nov 18 10:10:11 CET 2021


 Module: monitoring-plugins
 Branch: master
 Commit: 1c53c4f541db3afdc3a2975121b69064d53f7ef3
 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
   Date: Wed Nov 17 15:45:17 2021 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=1c53c4f

homogenize perfdata function and fix small bug with missing semicolon

---

 plugins/utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/plugins/utils.c b/plugins/utils.c
index ebdae2e..17dd581 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -589,10 +589,12 @@ char *perfdata (const char *label,
 		xasprintf (&data, "%s;", data);
 
 	if (minp)
-		xasprintf (&data, "%s%ld", data, minv);
+		xasprintf (&data, "%s%ld;", data, minv);
+	else
+		xasprintf (&data, "%s;", data);
 
 	if (maxp)
-		xasprintf (&data, "%s;%ld", data, maxv);
+		xasprintf (&data, "%s%ld", data, maxv);
 
 	return data;
 }



More information about the Commits mailing list