Skip to content

Commit

Permalink
remove clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed May 22, 2024
1 parent c1652ac commit 015aedf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ pub unsafe extern "C" fn sys_read(fd: FileDescriptor, buf: *mut u8, len: usize)

#[hermit_macro::system]
pub unsafe extern "C" fn sys_readv(fd: i32, iov: *const iovec, iovcnt: i32) -> isize {
if iovcnt < 0 || iovcnt > IOV_MAX {
if !(0..=IOV_MAX).contains(&iovcnt) {
return (-crate::errno::EINVAL).try_into().unwrap();
}

Expand Down Expand Up @@ -462,7 +462,7 @@ pub unsafe extern "C" fn sys_write(fd: FileDescriptor, buf: *const u8, len: usiz

#[hermit_macro::system]
pub unsafe extern "C" fn sys_writev(fd: FileDescriptor, iov: *const iovec, iovcnt: i32) -> isize {
if iovcnt < 0 || iovcnt > IOV_MAX {
if !(0..=IOV_MAX).contains(&iovcnt) {
return (-crate::errno::EINVAL).try_into().unwrap();
}

Expand Down

0 comments on commit 015aedf

Please sign in to comment.