[Freeswitch-svn] [commit] r6897 - freeswitch/trunk/src/mod/formats/mod_local_stream

Freeswitch SVN mikej at freeswitch.org
Wed Dec 19 00:41:14 EST 2007


Author: mikej
Date: Wed Dec 19 00:41:14 2007
New Revision: 6897

Modified:
   freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c

Log:
fix build.

Modified: freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	Wed Dec 19 00:41:14 2007
@@ -77,9 +77,11 @@
 
 static int do_rand(void)
 {
+	double r;
+	int index;
 	srand(getpid() + ++S);
-	double r = ((double)rand() / ((double)(RAND_MAX)+(double)(1)));
-	int index = (r * 9) + 1;
+	r = ((double)rand() / ((double)(RAND_MAX)+(double)(1)));
+	index = (int)(r * 9) + 1;
 	return index;
 }
 



More information about the Freeswitch-svn mailing list