somehow missed a bunch of gcc 4.3.x warnings in this branch on the first pass

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-11-03 13:01:18 +00:00
parent 0d1441526e
commit 18df35a2c1
8 changed files with 103 additions and 61 deletions

View File

@@ -723,10 +723,16 @@ static char *complete_context_remove_extension_deprecated(const char *line, cons
if (++which > state) {
/* If there is an extension then return exten@context. */
if (ast_get_extension_matchcid(e) && (!strchr(word, '@') || strchr(word, '/'))) {
asprintf(&ret, "%s/%s@%s", ast_get_extension_name(e), ast_get_extension_cidmatch(e), ast_get_context_name(c));
if (asprintf(&ret, "%s/%s@%s", ast_get_extension_name(e), ast_get_extension_cidmatch(e), ast_get_context_name(c)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
ret = NULL;
}
break;
} else if (!ast_get_extension_matchcid(e) && !strchr(word, '/')) {
asprintf(&ret, "%s@%s", ast_get_extension_name(e), ast_get_context_name(c));
if (asprintf(&ret, "%s@%s", ast_get_extension_name(e), ast_get_context_name(c)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
ret = NULL;
}
break;
}
}
@@ -863,10 +869,16 @@ static char *complete_context_remove_extension(const char *line, const char *wor
if (++which > state) {
/* If there is an extension then return exten@context. */
if (ast_get_extension_matchcid(e) && (!strchr(word, '@') || strchr(word, '/'))) {
asprintf(&ret, "%s/%s@%s", ast_get_extension_name(e), ast_get_extension_cidmatch(e), ast_get_context_name(c));
if (asprintf(&ret, "%s/%s@%s", ast_get_extension_name(e), ast_get_extension_cidmatch(e), ast_get_context_name(c)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
ret = NULL;
}
break;
} else if (!ast_get_extension_matchcid(e) && !strchr(word, '/')) {
asprintf(&ret, "%s@%s", ast_get_extension_name(e), ast_get_context_name(c));
if (asprintf(&ret, "%s@%s", ast_get_extension_name(e), ast_get_context_name(c)) < 0) {
ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
ret = NULL;
}
break;
}
}