diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-07 18:26:24 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-07 18:26:24 +0000 |
commit | ed05cd7f9a3dc7e3a826d01366d9607bf3ed229f (patch) | |
tree | 7c9f84af90c1ad655f2078e0d4ab282c7447d9cf /asterisk.c | |
parent | c38af513b07fe47fcf9ad064f892fcf9cd09a134 (diff) |
Fix command completion and remove compile time warnings
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2654 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-x | asterisk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asterisk.c b/asterisk.c index a11257cdc..a003093c6 100755 --- a/asterisk.c +++ b/asterisk.c @@ -992,7 +992,7 @@ static char **ast_el_strtoarr(char *buf) match_list = realloc(match_list, match_list_len * sizeof(char *)); } - match_list[matches++] = retstr; + match_list[matches++] = strdup(retstr); } if (!match_list) @@ -1098,7 +1098,7 @@ static char *cli_complete(EditLine *el, int ch) /* Start with a 2048 byte buffer */ mbuf = malloc(maxmbuf); if (!mbuf) - return (CC_ERROR); + return (char *)(CC_ERROR); snprintf(buf, sizeof(buf),"_COMMAND MATCHESARRAY \"%s\" \"%s\"", lf->buffer, ptr); fdprint(ast_consock, buf); res = 0; @@ -1108,7 +1108,7 @@ static char *cli_complete(EditLine *el, int ch) maxmbuf += 1024; mbuf = realloc(mbuf, maxmbuf); if (!mbuf) - return (CC_ERROR); + return (char *)(CC_ERROR); } /* Only read 1024 bytes at a time */ res = read(ast_consock, mbuf + mlen, 1024); |