invalid type cast correction

This commit is contained in:
Dmitriy N. Borisov authored and Ken Rice committed 2014-12-24 10:40:07 -06:00
1 parent 65ca6ed024
commit 41b97031d7
1 file changed
+1 -1
+1 -1
View File
@@ -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);