1
Fork 0

windows: Fix INVALID_HANDLE_VALUE

Made INVALID_HANDLE_VALUE actually a HANDLE.
Removed all useless casts during INVALID_HANDLE_VALUE comparisons.

Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
Peter Atashian 2014-08-07 16:40:12 -04:00
parent feb219d23f
commit 24ebbb4420
5 changed files with 17 additions and 18 deletions

View file

@ -197,7 +197,7 @@ mod imp {
libc::FILE_ATTRIBUTE_NORMAL,
ptr::mut_null())
};
if handle as uint == libc::INVALID_HANDLE_VALUE as uint {
if handle == libc::INVALID_HANDLE_VALUE {
fail!("create file error: {}", os::last_os_error());
}
let mut overlapped: libc::OVERLAPPED = unsafe { mem::zeroed() };