[asterisk-commits] trunk r26055 - /trunk/pbx.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 9 06:55:33 MST 2006


Author: rizzo
Date: Tue May  9 08:55:33 2006
New Revision: 26055

URL: http://svn.digium.com/view/asterisk?rev=26055&view=rev
Log:
remove duplicate atof() invokation


Modified:
    trunk/pbx.c

Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=26055&r1=26054&r2=26055&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Tue May  9 08:55:33 2006
@@ -4950,8 +4950,8 @@
 	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 @@
 		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



More information about the asterisk-commits mailing list