From 1a2f22f9e2af5c64d2e9b548068d7901839cd86c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 13 May 2008 06:23:47 +0000 Subject: [PATCH] fix msvc build git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8377 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_stun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/switch_stun.c b/src/switch_stun.c index 2d733ea54f..786f04ecd9 100644 --- a/src/switch_stun.c +++ b/src/switch_stun.c @@ -118,7 +118,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, u { switch_stun_packet_t *packet; switch_stun_packet_attribute_t *attr; - int32_t bytes_left = len; + uint32_t bytes_left = len; void *end_buf = buf + len; if (len < SWITCH_STUN_PACKET_MIN_LEN) { @@ -295,12 +295,12 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, u } while (bytes_left >= SWITCH_STUN_ATTRIBUTE_MIN_LEN && switch_stun_packet_next_attribute(attr, end_buf)); - if ((packet->header.length + 20) > (len - bytes_left)) { + if ((uint32_t)(packet->header.length + 20) > (uint32_t)(len - bytes_left)) { /* * the packet length is longer than the length of all attributes? * for now simply decrease the packet size */ - packet->header.length = (len - bytes_left) - 20; + packet->header.length = (uint16_t)((len - bytes_left) - 20); } return packet;