aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 00:39:04 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 00:39:04 +0000
commitd3d057390c26ce35b54750705377c4d3ff4e42bd (patch)
treea04b5ab1a5d778cb8c4239d8cac88ef1a5ebba5d /apps/app_dial.c
parent9a2130e9dec6e913af3b75006c23feb0520d6814 (diff)
port gcc 4.3.x warning fixes from trunk to this branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index fa98e4633..25776c0f4 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1762,10 +1762,16 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
gosub_argstart = strchr(opt_args[OPT_ARG_CALLEE_GOSUB], ',');
if (gosub_argstart) {
*gosub_argstart = 0;
- asprintf(&gosub_args, "%s,s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], gosub_argstart + 1);
+ if (asprintf(&gosub_args, "%s,s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], gosub_argstart + 1) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
*gosub_argstart = ',';
} else {
- asprintf(&gosub_args, "%s,s,1", opt_args[OPT_ARG_CALLEE_GOSUB]);
+ if (asprintf(&gosub_args, "%s,s,1", opt_args[OPT_ARG_CALLEE_GOSUB]) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
}
if (gosub_args) {