Skip to content

Commit

Permalink
Fix redundant comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Aug 21, 2022
1 parent f506656 commit 4ecf876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/process/process_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cfg_if::cfg_if! {
);

let bit = (signum - 1) as usize;
if set.is_null() || bit < 0 || bit >= (8 * size_of::<sigset_t>()) {
if set.is_null() || bit >= (8 * size_of::<sigset_t>()) {
crate::sys::unix::os::set_errno(libc::EINVAL);
return -1;
}
Expand Down

0 comments on commit 4ecf876

Please sign in to comment.