Skip to content

Commit 1895284

Browse files
committed
Use FALSE instead of 0
1 parent a18dee6 commit 1895284

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

bindings.txt

+1
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

+2-2
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.is_null() {
293293
let name = mutex_name();
294-
lock = CreateMutexA(ptr::null_mut(), 0, name.as_ptr());
294+
lock = CreateMutexA(ptr::null_mut(), FALSE, name.as_ptr());
295295
if lock.is_null() {
296296
return Err(());
297297
}
@@ -302,7 +302,7 @@ pub fn init() -> Result<Init, ()> {
302302
}
303303
}
304304
debug_assert!(!lock.is_null());
305-
let r = WaitForSingleObjectEx(lock, INFINITE, 0);
305+
let r = WaitForSingleObjectEx(lock, INFINITE, FALSE);
306306
debug_assert_eq!(r, 0);
307307
let ret = Init { lock };
308308

src/windows_sys.rs

+1
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)