Commit 7e632006 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

ntdll: Use BOOL type where appropriate.

parent 45eff32a
...@@ -115,7 +115,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT ...@@ -115,7 +115,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
ULONG options, PVOID ea_buffer, ULONG ea_length ) ULONG options, PVOID ea_buffer, ULONG ea_length )
{ {
ANSI_STRING unix_name; ANSI_STRING unix_name;
int created = FALSE; BOOL created = FALSE;
TRACE("handle=%p access=%08x name=%s objattr=%08x root=%p sec=%p io=%p alloc_size=%p " TRACE("handle=%p access=%08x name=%s objattr=%08x root=%p sec=%p io=%p alloc_size=%p "
"attr=%08x sharing=%08x disp=%d options=%08x ea=%p.0x%08x\n", "attr=%08x sharing=%08x disp=%d options=%08x ea=%p.0x%08x\n",
...@@ -586,14 +586,14 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, ...@@ -586,14 +586,14 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
PIO_STATUS_BLOCK io_status, void* buffer, ULONG length, PIO_STATUS_BLOCK io_status, void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key) PLARGE_INTEGER offset, PULONG key)
{ {
int result, unix_handle, needs_close, timeout_init_done = 0; int result, unix_handle, needs_close;
unsigned int options; unsigned int options;
struct io_timeouts timeouts; struct io_timeouts timeouts;
NTSTATUS status; NTSTATUS status;
ULONG total = 0; ULONG total = 0;
enum server_fd_type type; enum server_fd_type type;
ULONG_PTR cvalue = apc ? 0 : (ULONG_PTR)apc_user; ULONG_PTR cvalue = apc ? 0 : (ULONG_PTR)apc_user;
BOOL send_completion = FALSE, async_read; BOOL send_completion = FALSE, async_read, timeout_init_done = FALSE;
TRACE("(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p),partial stub!\n", TRACE("(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p),partial stub!\n",
hFile,hEvent,apc,apc_user,io_status,buffer,length,offset,key); hFile,hEvent,apc,apc_user,io_status,buffer,length,offset,key);
...@@ -733,7 +733,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, ...@@ -733,7 +733,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
if (!timeout_init_done) if (!timeout_init_done)
{ {
timeout_init_done = 1; timeout_init_done = TRUE;
if ((status = get_io_timeouts( hFile, type, length, TRUE, &timeouts ))) if ((status = get_io_timeouts( hFile, type, length, TRUE, &timeouts )))
goto err; goto err;
if (hEvent) NtResetEvent( hEvent, NULL ); if (hEvent) NtResetEvent( hEvent, NULL );
...@@ -965,14 +965,14 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, ...@@ -965,14 +965,14 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
const void* buffer, ULONG length, const void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key) PLARGE_INTEGER offset, PULONG key)
{ {
int result, unix_handle, needs_close, timeout_init_done = 0; int result, unix_handle, needs_close;
unsigned int options; unsigned int options;
struct io_timeouts timeouts; struct io_timeouts timeouts;
NTSTATUS status; NTSTATUS status;
ULONG total = 0; ULONG total = 0;
enum server_fd_type type; enum server_fd_type type;
ULONG_PTR cvalue = apc ? 0 : (ULONG_PTR)apc_user; ULONG_PTR cvalue = apc ? 0 : (ULONG_PTR)apc_user;
BOOL send_completion = FALSE, async_write, append_write = FALSE; BOOL send_completion = FALSE, async_write, append_write = FALSE, timeout_init_done = FALSE;
LARGE_INTEGER offset_eof; LARGE_INTEGER offset_eof;
TRACE("(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p)!\n", TRACE("(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p)!\n",
...@@ -1133,7 +1133,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, ...@@ -1133,7 +1133,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
if (!timeout_init_done) if (!timeout_init_done)
{ {
timeout_init_done = 1; timeout_init_done = TRUE;
if ((status = get_io_timeouts( hFile, type, length, FALSE, &timeouts ))) if ((status = get_io_timeouts( hFile, type, length, FALSE, &timeouts )))
goto err; goto err;
if (hEvent) NtResetEvent( hEvent, NULL ); if (hEvent) NtResetEvent( hEvent, NULL );
...@@ -2498,13 +2498,13 @@ static inline void get_device_info_fstatfs( FILE_FS_DEVICE_INFORMATION *info, co ...@@ -2498,13 +2498,13 @@ static inline void get_device_info_fstatfs( FILE_FS_DEVICE_INFORMATION *info, co
} }
#endif #endif
static inline int is_device_placeholder( int fd ) static inline BOOL is_device_placeholder( int fd )
{ {
static const char wine_placeholder[] = "Wine device placeholder"; static const char wine_placeholder[] = "Wine device placeholder";
char buffer[sizeof(wine_placeholder)-1]; char buffer[sizeof(wine_placeholder)-1];
if (pread( fd, buffer, sizeof(wine_placeholder) - 1, 0 ) != sizeof(wine_placeholder) - 1) if (pread( fd, buffer, sizeof(wine_placeholder) - 1, 0 ) != sizeof(wine_placeholder) - 1)
return 0; return FALSE;
return !memcmp( buffer, wine_placeholder, sizeof(wine_placeholder) - 1 ); return !memcmp( buffer, wine_placeholder, sizeof(wine_placeholder) - 1 );
} }
......
...@@ -1723,7 +1723,7 @@ NTSTATUS WINAPI RtlCharToInteger( ...@@ -1723,7 +1723,7 @@ NTSTATUS WINAPI RtlCharToInteger(
CHAR chCurrent; CHAR chCurrent;
int digit; int digit;
ULONG RunningTotal = 0; ULONG RunningTotal = 0;
char bMinus = 0; BOOL bMinus = FALSE;
while (*str != '\0' && *str <= ' ') { while (*str != '\0' && *str <= ' ') {
str++; str++;
...@@ -1732,7 +1732,7 @@ NTSTATUS WINAPI RtlCharToInteger( ...@@ -1732,7 +1732,7 @@ NTSTATUS WINAPI RtlCharToInteger(
if (*str == '+') { if (*str == '+') {
str++; str++;
} else if (*str == '-') { } else if (*str == '-') {
bMinus = 1; bMinus = TRUE;
str++; str++;
} /* if */ } /* if */
...@@ -1877,7 +1877,7 @@ NTSTATUS WINAPI RtlUnicodeStringToInteger( ...@@ -1877,7 +1877,7 @@ NTSTATUS WINAPI RtlUnicodeStringToInteger(
WCHAR wchCurrent; WCHAR wchCurrent;
int digit; int digit;
ULONG RunningTotal = 0; ULONG RunningTotal = 0;
char bMinus = 0; BOOL bMinus = FALSE;
while (CharsRemaining >= 1 && *lpwstr <= ' ') { while (CharsRemaining >= 1 && *lpwstr <= ' ') {
lpwstr++; lpwstr++;
...@@ -1889,7 +1889,7 @@ NTSTATUS WINAPI RtlUnicodeStringToInteger( ...@@ -1889,7 +1889,7 @@ NTSTATUS WINAPI RtlUnicodeStringToInteger(
lpwstr++; lpwstr++;
CharsRemaining--; CharsRemaining--;
} else if (*lpwstr == '-') { } else if (*lpwstr == '-') {
bMinus = 1; bMinus = TRUE;
lpwstr++; lpwstr++;
CharsRemaining--; CharsRemaining--;
} /* if */ } /* if */
......
...@@ -448,7 +448,7 @@ static size_t signal_stack_size; ...@@ -448,7 +448,7 @@ static size_t signal_stack_size;
static wine_signal_handler handlers[256]; static wine_signal_handler handlers[256];
static int fpux_support; /* whether the CPU support extended fpu context */ static BOOL fpux_support; /* whether the CPU supports extended fpu context */
extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context ); extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context );
...@@ -1126,7 +1126,7 @@ static inline void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext, ...@@ -1126,7 +1126,7 @@ static inline void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext,
{ {
context->ContextFlags |= CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS; context->ContextFlags |= CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS;
memcpy( context->ExtendedRegisters, fpux, sizeof(*fpux) ); memcpy( context->ExtendedRegisters, fpux, sizeof(*fpux) );
fpux_support = 1; fpux_support = TRUE;
if (!fpu) fpux_to_fpu( &context->FloatSave, fpux ); if (!fpu) fpux_to_fpu( &context->FloatSave, fpux );
} }
if (!fpu && !fpux) save_fpu( context ); if (!fpu && !fpux) save_fpu( context );
......
...@@ -734,7 +734,7 @@ char * __cdecl _i64toa( ...@@ -734,7 +734,7 @@ char * __cdecl _i64toa(
LONGLONG __cdecl _atoi64( const char *str ) LONGLONG __cdecl _atoi64( const char *str )
{ {
ULONGLONG RunningTotal = 0; ULONGLONG RunningTotal = 0;
char bMinus = 0; BOOL bMinus = FALSE;
while (*str == ' ' || (*str >= '\011' && *str <= '\015')) { while (*str == ' ' || (*str >= '\011' && *str <= '\015')) {
str++; str++;
...@@ -743,7 +743,7 @@ LONGLONG __cdecl _atoi64( const char *str ) ...@@ -743,7 +743,7 @@ LONGLONG __cdecl _atoi64( const char *str )
if (*str == '+') { if (*str == '+') {
str++; str++;
} else if (*str == '-') { } else if (*str == '-') {
bMinus = 1; bMinus = TRUE;
str++; str++;
} /* if */ } /* if */
......
...@@ -640,7 +640,7 @@ LPWSTR __cdecl _i64tow( ...@@ -640,7 +640,7 @@ LPWSTR __cdecl _i64tow(
LONG __cdecl _wtol( LPCWSTR str ) LONG __cdecl _wtol( LPCWSTR str )
{ {
ULONG RunningTotal = 0; ULONG RunningTotal = 0;
char bMinus = 0; BOOL bMinus = FALSE;
while (isspaceW(*str)) { while (isspaceW(*str)) {
str++; str++;
...@@ -649,7 +649,7 @@ LONG __cdecl _wtol( LPCWSTR str ) ...@@ -649,7 +649,7 @@ LONG __cdecl _wtol( LPCWSTR str )
if (*str == '+') { if (*str == '+') {
str++; str++;
} else if (*str == '-') { } else if (*str == '-') {
bMinus = 1; bMinus = TRUE;
str++; str++;
} /* if */ } /* if */
...@@ -703,7 +703,7 @@ int __cdecl _wtoi( LPCWSTR str ) ...@@ -703,7 +703,7 @@ int __cdecl _wtoi( LPCWSTR str )
LONGLONG __cdecl _wtoi64( LPCWSTR str ) LONGLONG __cdecl _wtoi64( LPCWSTR str )
{ {
ULONGLONG RunningTotal = 0; ULONGLONG RunningTotal = 0;
char bMinus = 0; BOOL bMinus = FALSE;
while (isspaceW(*str)) { while (isspaceW(*str)) {
str++; str++;
...@@ -712,7 +712,7 @@ LONGLONG __cdecl _wtoi64( LPCWSTR str ) ...@@ -712,7 +712,7 @@ LONGLONG __cdecl _wtoi64( LPCWSTR str )
if (*str == '+') { if (*str == '+') {
str++; str++;
} else if (*str == '-') { } else if (*str == '-') {
bMinus = 1; bMinus = TRUE;
str++; str++;
} /* if */ } /* if */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment