diff options
author | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-10-28 19:01:12 -0400 |
---|---|---|
committer | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-10-28 19:01:12 -0400 |
commit | 7def93cf33397887a9430152363c995cfd4390db (patch) | |
tree | d8f21f40c08729c0b0686f0bf22241b6296b4f62 /stun/utils.c | |
parent | 7e4bf0eefcd5a40da1591e2084c984c456dcab35 (diff) | |
download | libnice-7def93cf33397887a9430152363c995cfd4390db.tar.gz |
use socklen_t where needed, and cast it to size_t as it defined as an int in mingw and as an uint on linux systems
Diffstat (limited to 'stun/utils.c')
-rw-r--r-- | stun/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stun/utils.c b/stun/utils.c index 8a892df..b022421 100644 --- a/stun/utils.c +++ b/stun/utils.c @@ -176,7 +176,7 @@ int stun_xor_address (const StunMessage *msg, case AF_INET: { struct sockaddr_in *ip4 = (struct sockaddr_in *)addr; - if (addrlen < sizeof (*ip4)) + if ((size_t) addrlen < sizeof (*ip4)) return EINVAL; ip4->sin_port ^= htons (magic_cookie >> 16); @@ -189,7 +189,7 @@ int stun_xor_address (const StunMessage *msg, struct sockaddr_in6 *ip6 = (struct sockaddr_in6 *)addr; unsigned short i; - if (addrlen < sizeof (*ip6)) + if ((size_t) addrlen < sizeof (*ip6)) return EINVAL; ip6->sin6_port ^= htons (magic_cookie >> 16); |