提交 8a9ac531 authored 作者: Michael Jerris's avatar Michael Jerris

fix build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6897 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 285e8fc3
...@@ -77,9 +77,11 @@ static unsigned int S = 0; ...@@ -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;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论