diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 13:55:33 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 13:55:33 +0000 |
commit | a23fd896f07396599f7712718c4d52b0555656aa (patch) | |
tree | f167dd9f4fd9ed1dc3c4cac0a0307c56922a0152 /pbx.c | |
parent | e67287e712e78562f7edcda4da607b11d31c6ef1 (diff) |
remove duplicate atof() invokation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26055 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4950,8 +4950,8 @@ static int pbx_builtin_wait(struct ast_channel *chan, void *data) int ms; /* Wait for "n" seconds */ - if (data && atof(data)) { - ms = atof(data) * 1000; + if (data && (ms = atof(data)) > 0) { + ms *= 1000; return ast_safe_sleep(chan, ms); } return 0; @@ -4985,8 +4985,8 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data) ast_moh_start(chan, opts[0]); /* Wait for "n" seconds */ - if (args.timeout && atof(args.timeout)) - ms = atof(args.timeout) * 1000; + if (args.timeout && (ms = atof(args.timeout)) > 0) + ms *= 1000; else if (chan->pbx) ms = chan->pbx->rtimeout * 1000; else |