summaryrefslogtreecommitdiff
path: root/ext/socket/basicsocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/basicsocket.c')
-rw-r--r--ext/socket/basicsocket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 94c34da..19dc2f5 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -243,7 +243,7 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
default:
StringValue(val);
v = RSTRING_PTR(val);
- vlen = RSTRING_LENINT(val);
+ vlen = RSTRING_SOCKLEN(val);
break;
}
@@ -555,7 +555,7 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
SockAddrStringValue(to);
to = rb_str_new4(to);
arg.to = (struct sockaddr *)RSTRING_PTR(to);
- arg.tolen = (socklen_t)RSTRING_LENINT(to);
+ arg.tolen = RSTRING_SOCKLEN(to);
func = rsock_sendto_blocking;
}
else {