]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
invalid type cast correction
authorDmitriy N. Borisov <bordmi@rarus.ru>
Fri, 19 Dec 2014 08:13:55 +0000 (11:13 +0300)
committerDmitriy N. Borisov <bordmi@rarus.ru>
Fri, 19 Dec 2014 08:13:55 +0000 (11:13 +0300)
src/mod/endpoints/mod_sofia/sofia_reg.c

index b72070ba63fde87c009f862cb5ea7c5c0691ee72..7e26470d7329cda15d18a2626429b07c2a182c9f 100644 (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);