[Asterisk-cvs] asterisk cli.c,1.53.2.2,1.53.2.3

russell at lists.digium.com russell at lists.digium.com
Wed Nov 17 22:51:33 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv26348

Modified Files:
      Tag: v1-0
	cli.c 
Log Message:
tweaks to make valgrind happy


Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.53.2.2
retrieving revision 1.53.2.3
diff -u -d -r1.53.2.2 -r1.53.2.3
--- cli.c	14 Oct 2004 22:51:14 -0000	1.53.2.2
+++ cli.c	18 Nov 2004 03:51:58 -0000	1.53.2.3
@@ -869,10 +869,10 @@
 
 static int help_workhorse(int fd, char *match[])
 {
-	char fullcmd1[80];
-	char fullcmd2[80];
+	char fullcmd1[80] = "";
+	char fullcmd2[80] = "";
 	char matchstr[80];
-	char *fullcmd;
+	char *fullcmd = NULL;
 	struct ast_cli_entry *e, *e1, *e2;
 	e1 = builtins;
 	e2 = helpers;
@@ -1005,8 +1005,7 @@
 int ast_cli_generatornummatches(char *text, char *word)
 {
 	int matches = 0, i = 0;
-	char *buf, *oldbuf = NULL;
-
+	char *buf = NULL, *oldbuf = NULL;
 
 	while ( (buf = ast_cli_generator(text, word, i)) ) {
 		if (++i > 1 && strcmp(buf,oldbuf) == 0)  {
@@ -1065,10 +1064,10 @@
 	int x;
 	int matchnum=0;
 	char *dup, *res;
-	char fullcmd1[80];
-	char fullcmd2[80];
+	char fullcmd1[80] = "";
+	char fullcmd2[80] = "";
 	char matchstr[80];
-	char *fullcmd;
+	char *fullcmd = NULL;
 
 	if ((dup = parse_args(text, &x, argv))) {
 		join(matchstr, sizeof(matchstr), argv);




More information about the svn-commits mailing list