aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-21 00:42:25 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-21 00:42:25 +0000
commit708a7ca40ebcaac8a62cdac9eebd3326116ea1d8 (patch)
tree025deea905f3616996d9949bb02df38a4bdd19ca /app.c
parent8243b0f682681e4244021c772b42485e97910d8f (diff)
remove some useless checks after calls to ast_strdupa
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8362 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r--app.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/app.c b/app.c
index fedc95d57..bf7bd345b 100644
--- a/app.c
+++ b/app.c
@@ -1358,12 +1358,11 @@ static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option,
case AST_ACTION_BACKLIST:
res = 0;
c = ast_strdupa(option->adata);
- if (c) {
- while((n = strsep(&c, ";")))
- if ((res = ast_streamfile(chan, n, chan->language)) || (res = ast_waitstream(chan, (option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
- break;
- ast_stopstream(chan);
+ while ((n = strsep(&c, ";"))) {
+ if ((res = ast_streamfile(chan, n, chan->language)) || (res = ast_waitstream(chan, (option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
+ break;
}
+ ast_stopstream(chan);
return res;
default:
ast_log(LOG_NOTICE, "Unknown dispatch function %d, ignoring!\n", option->action);