diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-20 04:12:32 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-20 04:12:32 +0000 |
| commit | bdeda0e6945521bc29b6a36bda9f410b2b82c8ca (patch) | |
| tree | af0a51dc1086c17a4d1b6b46e6b23460315134cf | |
| parent | 2486fe540072d78ab04703dde94722dfdca618ae (diff) | |
| download | ruby-bdeda0e6945521bc29b6a36bda9f410b2b82c8ca.tar.gz ruby-bdeda0e6945521bc29b6a36bda9f410b2b82c8ca.tar.xz ruby-bdeda0e6945521bc29b6a36bda9f410b2b82c8ca.zip | |
avoid warnings in copy_stream_body.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | io.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -6630,7 +6630,7 @@ copy_stream_body(VALUE arg) { struct copy_stream_struct *stp = (struct copy_stream_struct *)arg; VALUE src_io, dst_io; - rb_io_t *src_fptr, *dst_fptr; + rb_io_t *src_fptr = 0, *dst_fptr = 0; int src_fd, dst_fd; char *src_path = 0, *dst_path = 0; @@ -6652,7 +6652,6 @@ copy_stream_body(VALUE arg) src_fd = src_fptr->fd; } else { - src_fptr = 0; FilePathValue(stp->src); src_path = StringValueCStr(stp->src); #ifdef O_NOCTTY @@ -6681,7 +6680,6 @@ copy_stream_body(VALUE arg) dst_fd = dst_fptr->fd; } else { - dst_fptr = 0; FilePathValue(stp->dst); dst_path = StringValueCStr(stp->dst); #ifdef O_NOCTTY @@ -6695,7 +6693,7 @@ copy_stream_body(VALUE arg) } stp->dst_fd = dst_fd; - if (stp->src_fd == -1 || stp->dst_fd == -1) { + if (src_fd == -1 || dst_fd == -1) { return copy_stream_fallback(stp); } |
