mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 01:16:50 +00:00
windows: resolve clippy::unnecessary_cast warnings
Change-Id: I07a6c2b2a737721baa202bd41acdc6f3aff4d7bc Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5241879 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Vikram Auradkar <auradkar@google.com>
This commit is contained in:
parent
659977977d
commit
e9e933ff6f
2 changed files with 2 additions and 6 deletions
|
@ -38,11 +38,7 @@ pub fn set_sparse_file<T: AsRawDescriptor>(handle: &T) -> io::Result<()> {
|
|||
// Safe because we check the return value and handle is guaranteed to be a
|
||||
// valid file handle by the caller.
|
||||
let result = unsafe {
|
||||
super::ioctl::ioctl_with_ptr(
|
||||
handle,
|
||||
FSCTL_SET_SPARSE,
|
||||
std::ptr::null_mut() as *mut c_void,
|
||||
)
|
||||
super::ioctl::ioctl_with_ptr(handle, FSCTL_SET_SPARSE, std::ptr::null_mut::<c_void>())
|
||||
};
|
||||
if result != 0 {
|
||||
return Err(io::Error::from_raw_os_error(result));
|
||||
|
|
|
@ -300,7 +300,7 @@ fn poll_sockets(mut sockets: Vec<WSAPOLLFD>) -> io::Result<Vec<WSAPOLLFD>> {
|
|||
// Safe because sockets is guaranteed to be valid, and we handle error return codes below.
|
||||
let poll_result = unsafe {
|
||||
WSAPoll(
|
||||
sockets.as_mut_ptr() as *mut WSAPOLLFD,
|
||||
sockets.as_mut_ptr(),
|
||||
sockets.len() as u32,
|
||||
1, /* timeout in ms */
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue