summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-19 16:28:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-19 16:28:56 +0000
commit9949407fd90c1c5bfe332141c75db995a9b867aa (patch)
tree908d6aaecf0cf61d50e7207cbf0afa08f59c0eb1
parent61d51d9de6ce28e1c306256ebcc65ba3a05a24ba (diff)
suppress a warning
* ext/socket/raddrinfo.c (rsock_fd_family): suppress a sign-compare warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 5bdde25..237055d 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -525,7 +525,7 @@ rsock_fd_family(int fd)
socklen_t sa_len = sizeof(sa);
if (fd < 0 || getsockname(fd, &sa, &sa_len) != 0 ||
- sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) {
+ (size_t)sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) {
return AF_UNSPEC;
}
return sa.sa_family;