diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-19 16:28:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-19 16:28:56 +0000 |
commit | 2f375645998dbb62fc1f76c6a9ffc68198b35e66 (patch) | |
tree | 908d6aaecf0cf61d50e7207cbf0afa08f59c0eb1 /ext/socket/raddrinfo.c | |
parent | 070d49ef191690b947990baf66e9524c2470563e (diff) | |
download | ruby-2f375645998dbb62fc1f76c6a9ffc68198b35e66.tar.gz |
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
Diffstat (limited to 'ext/socket/raddrinfo.c')
-rw-r--r-- | ext/socket/raddrinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 5bdde2584a..237055df8f 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; |