* io.c (nogvl_copy_stream_read_write, copy_stream_body): use size_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-03-12 10:40:33 +00:00
parent d1abc53721
commit 50d1f54d4d

4
io.c
View File

@ -7642,7 +7642,7 @@ static void
nogvl_copy_stream_read_write(struct copy_stream_struct *stp) nogvl_copy_stream_read_write(struct copy_stream_struct *stp)
{ {
char buf[1024*16]; char buf[1024*16];
int len; size_t len;
ssize_t ss; ssize_t ss;
int ret; int ret;
off_t copy_length; off_t copy_length;
@ -7859,7 +7859,7 @@ copy_stream_body(VALUE arg)
stp->dst_fd = dst_fd; stp->dst_fd = dst_fd;
if (stp->src_offset == (off_t)-1 && src_fptr && src_fptr->rbuf_len) { if (stp->src_offset == (off_t)-1 && src_fptr && src_fptr->rbuf_len) {
long len = src_fptr->rbuf_len; size_t len = src_fptr->rbuf_len;
VALUE str; VALUE str;
if (stp->copy_length != (off_t)-1 && stp->copy_length < len) { if (stp->copy_length != (off_t)-1 && stp->copy_length < len) {
len = (size_t)stp->copy_length; len = (size_t)stp->copy_length;