[Nagiosplug-checkins] CVS: nagiosplug/plugins utils.c,1.34,1.35

Karl DeBisschop kdebisschop at users.sourceforge.net
Wed Aug 27 21:32:34 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv14174

Modified Files:
	utils.c 
Log Message:
use single quotes per guideline, also quote when SPC or = are found

Index: utils.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** utils.c	28 Aug 2003 03:21:32 -0000	1.34
--- utils.c	28 Aug 2003 03:53:12 -0000	1.35
***************
*** 522,527 ****
  	char *data = NULL;
  
! 	if (index (label, '"'))
! 		asprintf (&data, "\"%s\"=%ld%s;", label, val, uom);
  	else
  		asprintf (&data, "%s=%ld%s;", label, val, uom);
--- 522,527 ----
  	char *data = NULL;
  
! 	if (strpbrk (label, "'= "))
! 		asprintf (&data, "'%s'=%ld%s;", label, val, uom);
  	else
  		asprintf (&data, "%s=%ld%s;", label, val, uom);





More information about the Commits mailing list