From: Michael Jerris Date: Wed, 19 Dec 2007 05:41:14 +0000 (+0000) Subject: fix build. X-Git-Tag: v1.0-rc1~971 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a9ac53124215ead61ce4e852980e2fda8a3df0a;p=thirdparty%2Ffreeswitch.git fix build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6897 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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; }