summaryrefslogtreecommitdiff
path: root/ext
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
commit90b51e99866d30b6ab746d39a527df768b88edba (patch)
tree6534b4accc6a12b466cd88f611929ff5e36833ac /ext
parent78cb1342c0410aac4ec254ce312b73725a2d3360 (diff)
* ext/socket/socket.c (host_str): numeric address should be unsigned.
[ruby-core:18971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 202e4b3431..9385ad714e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -840,7 +840,7 @@ host_str(host, hbuf, 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;