mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-08 19:11:20 +00:00
fix build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6897 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
285e8fc3c4
commit
8a9ac53124
@ -77,9 +77,11 @@ static unsigned int S = 0;
|
|||||||
|
|
||||||
static int do_rand(void)
|
static int do_rand(void)
|
||||||
{
|
{
|
||||||
|
double r;
|
||||||
|
int index;
|
||||||
srand(getpid() + ++S);
|
srand(getpid() + ++S);
|
||||||
double r = ((double)rand() / ((double)(RAND_MAX)+(double)(1)));
|
r = ((double)rand() / ((double)(RAND_MAX)+(double)(1)));
|
||||||
int index = (r * 9) + 1;
|
index = (int)(r * 9) + 1;
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user