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
ULONG options, PVOID ea_buffer, ULONG ea_length )
{
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 "
"attr=%08x sharing=%08x disp=%d options=%08x ea=%p.0x%08x\n",
......@@ -586,14 +586,14 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
PIO_STATUS_BLOCK io_status, void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key)
{
int result, unix_handle, needs_close, timeout_init_done = 0;
int result, unix_handle, needs_close;
unsigned int options;
struct io_timeouts timeouts;
NTSTATUS status;
ULONG total = 0;
enum server_fd_type type;
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",
hFile,hEvent,apc,apc_user,io_status,buffer,length,offset,key);
......@@ -733,7 +733,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
if (!timeout_init_done)
{
timeout_init_done = 1;
timeout_init_done = TRUE;
if ((status = get_io_timeouts( hFile, type, length, TRUE, &timeouts )))
goto err;
if (hEvent) NtResetEvent( hEvent, NULL );
......@@ -965,14 +965,14 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
const void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key)
{
int result, unix_handle, needs_close, timeout_init_done = 0;
int result, unix_handle, needs_close;
unsigned int options;
struct io_timeouts timeouts;
NTSTATUS status;
ULONG total = 0;
enum server_fd_type type;
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;
TRACE("(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p)!\n",
......@@ -1133,7 +1133,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
if (!timeout_init_done)
{
timeout_init_done = 1;
timeout_init_done = TRUE;
if ((status = get_io_timeouts( hFile, type, length, FALSE, &timeouts )))
goto err;
if (hEvent) NtResetEvent( hEvent, NULL );
......@@ -2498,13 +2498,13 @@ static inline void get_device_info_fstatfs( FILE_FS_DEVICE_INFORMATION *info, co
}
#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";
char buffer[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 );
}
......
......@@ -1723,7 +1723,7 @@ NTSTATUS WINAPI RtlCharToInteger(
CHAR chCurrent;
int digit;
ULONG RunningTotal = 0;
char bMinus = 0;
BOOL bMinus = FALSE;
while (*str != '\0' && *str <= ' ') {
str++;
......@@ -1732,7 +1732,7 @@ NTSTATUS WINAPI RtlCharToInteger(
if (*str == '+') {
str++;
} else if (*str == '-') {
bMinus = 1;
bMinus = TRUE;
str++;
} /* if */
......@@ -1877,7 +1877,7 @@ NTSTATUS WINAPI RtlUnicodeStringToInteger(
WCHAR wchCurrent;
int digit;
ULONG RunningTotal = 0;
char bMinus = 0;
BOOL bMinus = FALSE;
while (CharsRemaining >= 1 && *lpwstr <= ' ') {
lpwstr++;
......@@ -1889,7 +1889,7 @@ NTSTATUS WINAPI RtlUnicodeStringToInteger(
lpwstr++;
CharsRemaining--;
} else if (*lpwstr == '-') {
bMinus = 1;
bMinus = TRUE;
lpwstr++;
CharsRemaining--;
} /* if */
......
......@@ -448,7 +448,7 @@ static size_t signal_stack_size;
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 );
......@@ -1126,7 +1126,7 @@ static inline void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext,
{
context->ContextFlags |= CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS;
memcpy( context->ExtendedRegisters, fpux, sizeof(*fpux) );
fpux_support = 1;
fpux_support = TRUE;
if (!fpu) fpux_to_fpu( &context->FloatSave, fpux );
}
if (!fpu && !fpux) save_fpu( context );
......
......@@ -734,7 +734,7 @@ char * __cdecl _i64toa(
LONGLONG __cdecl _atoi64( const char *str )
{
ULONGLONG RunningTotal = 0;
char bMinus = 0;
BOOL bMinus = FALSE;
while (*str == ' ' || (*str >= '\011' && *str <= '\015')) {
str++;
......@@ -743,7 +743,7 @@ LONGLONG __cdecl _atoi64( const char *str )
if (*str == '+') {
str++;
} else if (*str == '-') {
bMinus = 1;
bMinus = TRUE;
str++;
} /* if */
......
......@@ -640,7 +640,7 @@ LPWSTR __cdecl _i64tow(
LONG __cdecl _wtol( LPCWSTR str )
{
ULONG RunningTotal = 0;
char bMinus = 0;
BOOL bMinus = FALSE;
while (isspaceW(*str)) {
str++;
......@@ -649,7 +649,7 @@ LONG __cdecl _wtol( LPCWSTR str )
if (*str == '+') {
str++;
} else if (*str == '-') {
bMinus = 1;
bMinus = TRUE;
str++;
} /* if */
......@@ -703,7 +703,7 @@ int __cdecl _wtoi( LPCWSTR str )
LONGLONG __cdecl _wtoi64( LPCWSTR str )
{
ULONGLONG RunningTotal = 0;
char bMinus = 0;
BOOL bMinus = FALSE;
while (isspaceW(*str)) {
str++;
......@@ -712,7 +712,7 @@ LONGLONG __cdecl _wtoi64( LPCWSTR str )
if (*str == '+') {
str++;
} else if (*str == '-') {
bMinus = 1;
bMinus = TRUE;
str++;
} /* 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