Skip to content

Commit 61ac193

Browse files
author
Maksim Panfilov
committed
Replace casting to Ioctl with a const from libc
1 parent efe0774 commit 61ac193

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/uu/cp/src/platform/linux.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ where
6262
let dst_file = File::create(&dest)?;
6363
let src_fd = src_file.as_raw_fd();
6464
let dst_fd = dst_file.as_raw_fd();
65-
let result =
66-
unsafe { libc::ioctl(dst_fd, linux_raw_sys::ioctl::FICLONE as libc::Ioctl, src_fd) };
65+
let result = unsafe { libc::ioctl(dst_fd, libc::FICLONE, src_fd) };
6766
if result == 0 {
6867
return Ok(());
6968
}

0 commit comments

Comments
 (0)