Explorar el Código

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
Karl DeBisschop hace 23 años
padre
commit
0644b39884
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      plugins/utils.c

+ 2 - 2
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);