Skip to content

Commit 35f1d8d

Browse files
committed
Use FALSE instead of 0
1 parent 44a03c4 commit 35f1d8d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

bindings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
--config std flatten
33
--filter
44
Windows.Win32.Foundation.CloseHandle
5+
Windows.Win32.Foundation.FALSE
56
Windows.Win32.Foundation.HINSTANCE
67
Windows.Win32.Foundation.INVALID_HANDLE_VALUE
78
Windows.Win32.Foundation.TRUE

src/dbghelp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ pub fn init() -> Result<Init, ()> {
291291
let mut lock = LOCK.load(SeqCst);
292292
if lock == 0 {
293293
let name = mutex_name();
294-
lock = CreateMutexA(ptr::null_mut(), 0, name.as_ptr()) as usize;
294+
lock = CreateMutexA(ptr::null_mut(), FALSE, name.as_ptr()) as usize;
295295
if lock == 0 {
296296
return Err(());
297297
}
@@ -303,7 +303,7 @@ pub fn init() -> Result<Init, ()> {
303303
}
304304
debug_assert!(lock != 0);
305305
let lock = lock as HANDLE;
306-
let r = WaitForSingleObjectEx(lock, INFINITE, 0);
306+
let r = WaitForSingleObjectEx(lock, INFINITE, FALSE);
307307
debug_assert_eq!(r, 0);
308308
let ret = Init { lock };
309309

src/windows_sys.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ pub type EXCEPTION_ROUTINE = Option<
496496
dispatchercontext: *const core::ffi::c_void,
497497
) -> EXCEPTION_DISPOSITION,
498498
>;
499+
pub const FALSE: BOOL = 0i32;
499500
pub type FARPROC = Option<unsafe extern "system" fn() -> isize>;
500501
pub type FILE_MAP = u32;
501502
pub const FILE_MAP_READ: FILE_MAP = 4u32;

0 commit comments

Comments
 (0)