summaryrefslogtreecommitdiff
path: root/ext/socket/raddrinfo.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-19 10:54:56 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-19 10:54:56 +0000
commit85198c5e3cf702a333cf1acfbbbe8e925419e148 (patch)
tree365ab08de9f40f27474084a57ceb0d0093520db8 /ext/socket/raddrinfo.c
parentb73ea4b64ac0d7ad9666b4325d94f180849f97f3 (diff)
* ext/socket/ancdata.c (ancillary_timestamp): fix a constant type.
* ext/socket/raddrinfo.c (get_afamily): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/raddrinfo.c')
-rw-r--r--ext/socket/raddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index c386bb9..5638c9e 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -908,7 +908,7 @@ addrinfo_initialize(int argc, VALUE *argv, VALUE self)
static int
get_afamily(struct sockaddr *addr, socklen_t len)
{
- if ((char*)&addr->sa_family + sizeof(addr->sa_family) - (char*)addr <= len)
+ if ((socklen_t)((char*)&addr->sa_family + sizeof(addr->sa_family) - (char*)addr) <= len)
return addr->sa_family;
else
return AF_UNSPEC;