From 0be391132a58c60b9db794e8c49b21ead125d5e1 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 25 Oct 2006 04:47:08 +0000 Subject: [PATCH] datatype tweaks. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3193 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr.c | 2 +- src/switch_resample.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 6f47ad0639..4a6d76ff79 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -1977,7 +1977,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess while ((!caller_channel || switch_channel_ready(caller_channel)) && check_channel_status(peer_channels, peer_sessions, and_argc, &idx, file, key)) { - if ((to = ((time(NULL) - start) >= (time_t)timelimit_sec))) { + if ((to = (uint8_t)((time(NULL) - start) >= (time_t)timelimit_sec))) { break; } diff --git a/src/switch_resample.c b/src/switch_resample.c index e52ae20fab..d8a99c2d1b 100644 --- a/src/switch_resample.c +++ b/src/switch_resample.c @@ -205,13 +205,13 @@ SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, i if (newrate) { int32_t tmp; - int x; + uint32_t x; int16_t *fp = data; for (x = 0; x < samples; x++) { - tmp = (double) div ? fp[x] / newrate : fp[x] * newrate; + tmp = (int32_t) (div ? fp[x] / newrate : fp[x] * newrate); switch_normalize_to_16bit(tmp); - fp[x] = tmp; + fp[x] = (int16_t)tmp; } } }