]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix build.
authorMichael Jerris <mike@jerris.com>
Wed, 19 Dec 2007 05:41:14 +0000 (05:41 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 19 Dec 2007 05:41:14 +0000 (05:41 +0000)
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

index befca2e096061ed82e6fc7403326a5a32092a6a2..37a9ed44a9e0ee036e18b85a8c8baedb1c3f8e94 100644 (file)
@@ -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;
 }