提交 c96d64e7 authored 作者: Dmitriy N. Borisov's avatar Dmitriy N. Borisov

invalid type cast correction

上级 42ecb339
......@@ -857,7 +857,7 @@ long sofia_reg_uniform_distribution(int max)
int result;
int range = max + 1;
srand((unsigned) switch_thread_self() + switch_micro_time_now());
srand((intptr_t) switch_thread_self() + switch_micro_time_now());
result = (int)((double)rand() / (((double)RAND_MAX + (double)1) / range));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG9, "Generated random %ld, max is %d\n", (long) result, max);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论