Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
radu committed Jun 23, 2024
1 parent 9665dd8 commit ff2ca1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ unsafe fn _mlock(ptr: *mut u8, len: usize) -> bool {
/// Calls the platform's underlying `munlock(2)` implementation.
unsafe fn _munlock(ptr: *mut u8, len: usize) -> bool {
let r = memsec::munlock(ptr, len);
if r == false && cfg!(target_os = "windows") {
if !r && cfg!(target_os = "windows") {
// On windows if we munlock 2 times on the same page we get an error.
// This can happen if we munlock 2 vars that are in the same page.
return true;
Expand Down

0 comments on commit ff2ca1d

Please sign in to comment.