mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
io.c: remove unused variable and fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0f79725a0d
commit
43a45b3fed
1 changed files with 2 additions and 3 deletions
5
io.c
5
io.c
|
@ -10952,18 +10952,17 @@ nogvl_copy_file_range(struct copy_stream_struct *stp)
|
||||||
static int
|
static int
|
||||||
nogvl_fcopyfile(struct copy_stream_struct *stp)
|
nogvl_fcopyfile(struct copy_stream_struct *stp)
|
||||||
{
|
{
|
||||||
off_t src_size, cur, ss = 0;
|
off_t cur, ss = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (stp->copy_length >= (off_t)0) {
|
if (stp->copy_length >= (off_t)0) {
|
||||||
/* copy_length can't be specified in copyfile(3) */
|
/* copy_length can't be specified in fcopyfile(3) */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!S_ISREG(stp->src_stat.st_mode))
|
if (!S_ISREG(stp->src_stat.st_mode))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
src_size = stp->src_stat.st_size;
|
|
||||||
if (!S_ISREG(stp->dst_stat.st_mode))
|
if (!S_ISREG(stp->dst_stat.st_mode))
|
||||||
return 0;
|
return 0;
|
||||||
if (lseek(stp->dst_fd, 0, SEEK_CUR) > (off_t)0) /* if dst IO was already written */
|
if (lseek(stp->dst_fd, 0, SEEK_CUR) > (off_t)0) /* if dst IO was already written */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue