[Asterisk-cvs] asterisk cli.c,1.61,1.62
markster at lists.digium.com
markster at lists.digium.com
Wed Nov 17 14:27:40 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv24239
Modified Files:
cli.c
Log Message:
Fix initialization of CLI (bug #2861)
Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- cli.c 6 Nov 2004 21:33:01 -0000 1.61
+++ cli.c 17 Nov 2004 19:28:08 -0000 1.62
@@ -936,10 +936,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;
@@ -1072,8 +1072,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) {
@@ -1132,10 +1131,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