From 8a9ac53124215ead61ce4e852980e2fda8a3df0a Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 19 Dec 2007 05:41:14 +0000 Subject: [PATCH] fix build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6897 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/formats/mod_local_stream/mod_local_stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/formats/mod_local_stream/mod_local_stream.c b/src/mod/formats/mod_local_stream/mod_local_stream.c index befca2e096..37a9ed44a9 100644 --- a/src/mod/formats/mod_local_stream/mod_local_stream.c +++ b/src/mod/formats/mod_local_stream/mod_local_stream.c @@ -77,9 +77,11 @@ static unsigned int S = 0; 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; }