]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
tweaks to make valgrind happy
authorRussell Bryant <russell@russellbryant.com>
Thu, 18 Nov 2004 03:51:58 +0000 (03:51 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 18 Nov 2004 03:51:58 +0000 (03:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4285 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cli.c

diff --git a/cli.c b/cli.c
index f1ac752df6ed3b6dde48f2ec2712ef7de10b4734..7b32ec5664e302099034135c819f5b028747acb9 100755 (executable)
--- a/cli.c
+++ b/cli.c
@@ -869,10 +869,10 @@ int ast_cli_register(struct ast_cli_entry *e)
 
 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 @@ normal:
 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 @@ static char *__ast_cli_generator(char *text, char *word, int state, int lock)
        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);