From 0644b3988487e4eb70352dc65d4f840de57d9330 Mon Sep 17 00:00:00 2001
From: Karl DeBisschop <kdebisschop@users.sourceforge.net>
Date: Thu, 28 Aug 2003 03:53:12 +0000
Subject: use single quotes per guideline, also quote when SPC or = are found

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@702 f882894a-f735-0410-b71e-b25c423dba1c

diff --git a/plugins/utils.c b/plugins/utils.c
index 5dbdb4d..ec25473 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -521,8 +521,8 @@ char *perfdata (const char *label,
 {
 	char *data = NULL;
 
-	if (index (label, '"'))
-		asprintf (&data, "\"%s\"=%ld%s;", label, val, uom);
+	if (strpbrk (label, "'= "))
+		asprintf (&data, "'%s'=%ld%s;", label, val, uom);
 	else
 		asprintf (&data, "%s=%ld%s;", label, val, uom);
 
-- 
cgit v0.10-9-g596f

