unix: don't use req->loop in uv__fs_copyfile()

Pass NULL instead of req->loop to the various libuv functions
called from uv__fs_copyfile().

Refs: https://github.com/libuv/libuv/pull/1494
PR-URL: https://github.com/libuv/libuv/pull/1504
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
cjihrig 2017-08-21 22:15:39 -04:00
parent afc05a3ab0
commit 564677d325
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -793,7 +793,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
dstfd = -1;
/* Open the source file. */
srcfd = uv_fs_open(req->loop, &fs_req, req->path, O_RDONLY, 0, NULL);
srcfd = uv_fs_open(NULL, &fs_req, req->path, O_RDONLY, 0, NULL);
uv_fs_req_cleanup(&fs_req);
if (srcfd < 0)
@ -811,7 +811,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
dst_flags |= O_EXCL;
/* Open the destination file. */
dstfd = uv_fs_open(req->loop,
dstfd = uv_fs_open(NULL,
&fs_req,
req->new_path,
dst_flags,
@ -824,7 +824,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
goto out;
}
err = uv_fs_sendfile(req->loop,
err = uv_fs_sendfile(NULL,
&fs_req,
dstfd,
srcfd,