[Nagiosplug-checkins] nagiosplug/plugins check_snmp.c,1.63,1.64

Ton Voon tonvoon at users.sourceforge.net
Thu Oct 19 21:25:54 CEST 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2560/plugins

Modified Files:
	check_snmp.c 
Log Message:
Removed asprintf for perf data (Craig Orsinger, Robby Giffin - 1310495)


Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- check_snmp.c	19 Oct 2006 19:13:45 -0000	1.63
+++ check_snmp.c	19 Oct 2006 19:25:52 -0000	1.64
@@ -152,7 +152,6 @@
 	char *p2 = NULL;
 	char *show = NULL;
 	char type[8];
-	char *str[MAX_INPUT_BUFFER];
 
 	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
@@ -349,8 +348,11 @@
 
 		i++;
 
-		asprintf(str, "=%s%s;;;; ", show, type ? type : "");
-		strcat(perfstr, *str);
+		strcat(perfstr, "=");
+		strcat(perfstr, show);
+		if (type)
+			strcat(perfstr, type);
+		strcat(perfstr, " ");
 
 	}	/* end while (ptr) */
 





More information about the Commits mailing list