summaryrefslogtreecommitdiffstats
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-26 18:12:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-26 18:12:43 +0000
commit86207cf02abf4a926cfd58bfd98915a71973334c (patch)
tree100ff13e181e8062e55c9e85b38eafad4a0a2b35 /ext/socket/socket.c
parent3393a544a3e5ddaf3cfa3750ac947c2513425d2e (diff)
downloadruby-86207cf02abf4a926cfd58bfd98915a71973334c.tar.gz
ruby-86207cf02abf4a926cfd58bfd98915a71973334c.tar.xz
ruby-86207cf02abf4a926cfd58bfd98915a71973334c.zip
* ext/socket/socket.c (host_str): numeric address should be unsigned.
[ruby-core:18971] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 698bc6099..c2e57850c 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -869,7 +869,7 @@ host_str(VALUE host, char *hbuf, size_t len)
return NULL;
}
else if (rb_obj_is_kind_of(host, rb_cInteger)) {
- long i = NUM2LONG(host);
+ unsigned long i = NUM2ULONG(host);
make_inetaddr(htonl(i), hbuf, len);
return hbuf;