From c09a93be1b9dc46714b1e7ccf03846ae07d9e2ea Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 11 Dec 2007 19:20:12 +0000 Subject: [PATCH] fix msvc build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6660 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_port_allocator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switch_core_port_allocator.c b/src/switch_core_port_allocator.c index 7d912529e4..c3e484e386 100644 --- a/src/switch_core_port_allocator.c +++ b/src/switch_core_port_allocator.c @@ -92,11 +92,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c int odd = switch_test_flag(alloc, SPF_ODD); switch_mutex_lock(alloc->mutex); - srand(getpid() + time(NULL)); + srand(getpid() + (unsigned)time(NULL)); while(alloc->track_used < alloc->track_len) { double r; - int index; + uint32_t index; int tries = 0; do { @@ -117,9 +117,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c status = SWITCH_STATUS_SUCCESS; if ((even && odd)) { - port = index + alloc->start; + port = (switch_port_t)(index + alloc->start); } else { - port = index + (alloc->start / 2); + port = (switch_port_t)(index + (alloc->start / 2)); port *= 2; } goto end;