diff --git a/src/lib.rs b/src/lib.rs index ea547c3..5017147 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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;