ntdll: Use BOOL type where appropriate
Frédéric Delanoy
frederic.delanoy at gmail.com
Mon Oct 28 16:18:04 CDT 2013
---
dlls/ntdll/cdrom.c | 22 +++++++++++-----------
dlls/ntdll/directory.c | 6 +++---
dlls/ntdll/file.c | 18 +++++++++---------
dlls/ntdll/loader.c | 6 +++---
dlls/ntdll/loadorder.c | 4 ++--
dlls/ntdll/misc.c | 4 ++--
dlls/ntdll/nt.c | 10 +++++-----
dlls/ntdll/resource.c | 2 +-
dlls/ntdll/rtlstr.c | 8 ++++----
dlls/ntdll/server.c | 18 +++++++++---------
dlls/ntdll/signal_arm.c | 4 ++--
dlls/ntdll/signal_arm64.c | 4 ++--
dlls/ntdll/signal_i386.c | 4 ++--
dlls/ntdll/signal_powerpc.c | 4 ++--
dlls/ntdll/signal_x86_64.c | 4 ++--
dlls/ntdll/string.c | 4 ++--
dlls/ntdll/time.c | 4 ++--
dlls/ntdll/version.c | 2 +-
dlls/ntdll/virtual.c | 10 +++++-----
dlls/ntdll/wcstring.c | 8 ++++----
20 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index 18c7874..62c3d16 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -575,13 +575,13 @@ static void CDROM_ClearCacheEntry(int dev)
* Determines the ide interface (the number after the ide), and the
* number of the device on that interface for ide cdroms (*iface <= 1).
* Determines the scsi information for scsi cdroms (*iface >= 2).
- * Returns false if the info cannot not be obtained.
+ * Returns FALSE if the info cannot not be obtained.
*/
-static int CDROM_GetInterfaceInfo(int fd, UCHAR* iface, UCHAR* port, UCHAR* device, UCHAR* lun)
+static BOOL CDROM_GetInterfaceInfo(int fd, UCHAR* iface, UCHAR* port, UCHAR* device, UCHAR* lun)
{
#if defined(linux)
struct stat st;
- if ( fstat(fd, &st) == -1 || ! S_ISBLK(st.st_mode)) return 0;
+ if ( fstat(fd, &st) == -1 || ! S_ISBLK(st.st_mode)) return FALSE;
*port = 0;
*iface = 0;
*device = 0;
@@ -615,10 +615,10 @@ static int CDROM_GetInterfaceInfo(int fd, UCHAR* iface, UCHAR* port, UCHAR* devi
#endif
{
WARN("CD-ROM device (%d, %d) not supported\n", major(st.st_rdev), minor(st.st_rdev));
- return 0;
+ return FALSE;
}
}
- return 1;
+ return TRUE;
#elif defined(__NetBSD__)
struct scsi_addr addr;
if (ioctl(fd, SCIOCIDENTIFY, &addr) != -1)
@@ -630,16 +630,16 @@ static int CDROM_GetInterfaceInfo(int fd, UCHAR* iface, UCHAR* port, UCHAR* devi
*iface = addr.addr.scsi.scbus;
*device = addr.addr.scsi.target;
*lun = addr.addr.scsi.lun;
- return 1;
+ return TRUE;
case TYPE_ATAPI:
*port = 0;
*iface = addr.addr.atapi.atbus;
*device = addr.addr.atapi.drive;
*lun = 0;
- return 1;
+ return TRUE;
}
}
- return 0;
+ return FALSE;
#elif defined(__APPLE__)
dk_scsi_identify_t addr;
if (ioctl(fd, DKIOCSCSIIDENTIFY, &addr) != -1)
@@ -648,12 +648,12 @@ static int CDROM_GetInterfaceInfo(int fd, UCHAR* iface, UCHAR* port, UCHAR* devi
*iface = addr.port;
*device = addr.target;
*lun = addr.lun;
- return 1;
+ return TRUE;
}
- return 0;
+ return FALSE;
#else
FIXME("not implemented on this O/S\n");
- return 0;
+ return FALSE;
#endif
}
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 4af3456..0306f77 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -161,7 +161,7 @@ static BOOL show_dot_files;
static RTL_RUN_ONCE init_once = RTL_RUN_ONCE_INIT;
/* at some point we may want to allow Winelib apps to set this */
-static const int is_case_sensitive = FALSE;
+static const BOOL is_case_sensitive = FALSE;
UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */
@@ -187,7 +187,7 @@ static inline BOOL is_invalid_dos_char( WCHAR ch )
}
/* check if the device can be a mounted volume */
-static inline int is_valid_mounted_device( const struct stat *st )
+static inline BOOL is_valid_mounted_device( const struct stat *st )
{
#if defined(linux) || defined(__sun__)
return S_ISBLK( st->st_mode );
@@ -1184,7 +1184,7 @@ static ULONG hash_short_file_name( const UNICODE_STRING *name, LPWSTR buffer )
*/
static BOOLEAN match_filename( const UNICODE_STRING *name_str, const UNICODE_STRING *mask_str )
{
- int mismatch;
+ BOOL mismatch;
const WCHAR *name = name_str->Buffer;
const WCHAR *mask = mask_str->Buffer;
const WCHAR *name_end = name + name_str->Length / sizeof(WCHAR);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 9dbc8fe..ac604ff 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -112,7 +112,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",
@@ -583,14 +583,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);
@@ -730,7 +730,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 );
@@ -962,14 +962,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",
@@ -1130,7 +1130,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 );
@@ -2486,13 +2486,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 );
}
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3a28b41..0455df4 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -57,7 +57,7 @@ WINE_DECLARE_DEBUG_CHANNEL(imports);
typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID);
-static int process_detaching = 0; /* set on process detach to avoid deadlocks with thread detach */
+static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */
static int free_lib_count; /* recursion depth of LdrUnloadDll calls */
static const char * const reason_names[] =
@@ -127,7 +127,7 @@ static inline void *get_rva( HMODULE module, DWORD va )
}
/* check whether the file name contains a path */
-static inline int contains_path( LPCWSTR name )
+static inline BOOL contains_path( LPCWSTR name )
{
return ((*name && (name[1] == ':')) || strchrW(name, '/') || strchrW(name, '\\'));
}
@@ -2391,7 +2391,7 @@ BOOLEAN WINAPI RtlDllShutdownInProgress(void)
void WINAPI LdrShutdownProcess(void)
{
TRACE("()\n");
- process_detaching = 1;
+ process_detaching = TRUE;
process_detach();
}
diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c
index ae50a4c..ec2d84e 100644
--- a/dlls/ntdll/loadorder.c
+++ b/dlls/ntdll/loadorder.c
@@ -53,7 +53,7 @@ struct loadorder_list
static const WCHAR separatorsW[] = {',',' ','\t',0};
-static int init_done;
+static BOOL init_done = FALSE;
static struct loadorder_list env_list;
@@ -232,7 +232,7 @@ static void init_load_order(void)
UNICODE_STRING strW;
WCHAR *entry, *next;
- init_done = 1;
+ init_done = TRUE;
if (!order) return;
if (!strcmp( order, "help" ))
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index a6b3b22..63be430 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -74,12 +74,12 @@ void CDECL NTDLL_wine_get_host_version( const char **sysname, const char **relea
{
#ifdef HAVE_SYS_UTSNAME_H
static struct utsname buf;
- static int init_done;
+ static BOOL init_done = FALSE;
if (!init_done)
{
uname( &buf );
- init_done = 1;
+ init_done = TRUE;
}
if (sysname) *sysname = buf.sysname;
if (release) *release = buf.release;
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 8a53d03..c9499d6 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -850,7 +850,7 @@ static inline void do_cpuid(unsigned int ax, unsigned int *p)
}
/* From xf86info havecpuid.c 1.11 */
-static inline int have_cpuid(void)
+static inline BOOL have_cpuid(void)
{
#ifdef __i386__
unsigned int f1, f2;
@@ -868,16 +868,16 @@ static inline int have_cpuid(void)
: "ir" (0x00200000));
return ((f1^f2) & 0x00200000) != 0;
#elif defined(__x86_64__)
- return 1;
+ return TRUE;
#else
- return 0;
+ return FALSE;
#endif
}
/* Detect if a SSE2 processor is capable of Denormals Are Zero (DAZ) mode.
*
* This function assumes you have already checked for SSE2/FXSAVE support. */
-static inline int have_sse_daz_mode(void)
+static inline BOOL have_sse_daz_mode(void)
{
#ifdef __i386__
typedef struct DECLSPEC_ALIGN(16) _M128A {
@@ -913,7 +913,7 @@ static inline int have_sse_daz_mode(void)
return (state->MxCsr_Mask & (1 << 6)) >> 6;
#else /* all x86_64 processors include SSE2 with DAZ mode */
- return 1;
+ return TRUE;
#endif
}
diff --git a/dlls/ntdll/resource.c b/dlls/ntdll/resource.c
index 0d60d96..9635bb0 100644
--- a/dlls/ntdll/resource.c
+++ b/dlls/ntdll/resource.c
@@ -56,7 +56,7 @@ static LANGID user_ui_language, system_ui_language;
*
* Check if a module handle is for a LOAD_LIBRARY_AS_DATAFILE module.
*/
-static inline int is_data_file_module( HMODULE hmod )
+static inline BOOL is_data_file_module( HMODULE hmod )
{
return (ULONG_PTR)hmod & 1;
}
diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c
index b092772..01b4446 100644
--- a/dlls/ntdll/rtlstr.c
+++ b/dlls/ntdll/rtlstr.c
@@ -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 */
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 9b3aeef..c8146de 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -814,7 +814,7 @@ static inline unsigned int handle_to_index( HANDLE handle, unsigned int *entry )
*
* Caller must hold fd_cache_section.
*/
-static int add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
+static BOOL add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
unsigned int access, unsigned int options )
{
unsigned int entry, idx = handle_to_index( handle, &entry );
@@ -823,7 +823,7 @@ static int add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
if (entry >= FD_CACHE_ENTRIES)
{
FIXME( "too many allocated handles, not caching %p\n", handle );
- return 0;
+ return FALSE;
}
if (!fd_cache[entry]) /* do we need to allocate a new block of entries? */
@@ -833,7 +833,7 @@ static int add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
{
void *ptr = wine_anon_mmap( NULL, FD_CACHE_BLOCK_SIZE * sizeof(struct fd_cache_entry),
PROT_READ | PROT_WRITE, 0 );
- if (ptr == MAP_FAILED) return 0;
+ if (ptr == MAP_FAILED) return FALSE;
fd_cache[entry] = ptr;
}
}
@@ -843,7 +843,7 @@ static int add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
fd_cache[entry][idx].access = access;
fd_cache[entry][idx].options = options;
if (prev_fd != -1) close( prev_fd );
- return 1;
+ return TRUE;
}
@@ -1025,12 +1025,12 @@ int server_pipe( int fd[2] )
{
int ret;
#ifdef HAVE_PIPE2
- static int have_pipe2 = 1;
+ static BOOL have_pipe2 = TRUE;
if (have_pipe2)
{
if (!(ret = pipe2( fd, O_CLOEXEC ))) return ret;
- if (errno == ENOSYS || errno == EINVAL) have_pipe2 = 0; /* don't try again */
+ if (errno == ENOSYS || errno == EINVAL) have_pipe2 = FALSE; /* don't try again */
}
#endif
if (!(ret = pipe( fd )))
@@ -1049,7 +1049,7 @@ int server_pipe( int fd[2] )
*/
static void start_server(void)
{
- static int started; /* we only try once */
+ static BOOL started = FALSE; /* we only try once */
char *argv[3];
static char wineserver[] = "server/wineserver";
static char debug[] = "-d";
@@ -1071,7 +1071,7 @@ static void start_server(void)
status = WIFEXITED(status) ? WEXITSTATUS(status) : 1;
if (status == 2) return; /* server lock held by someone else, will retry later */
if (status) exit(status); /* server failed */
- started = 1;
+ started = TRUE;
}
}
@@ -1428,7 +1428,7 @@ NTSTATUS server_init_process_done(void)
*/
size_t server_init_thread( void *entry_point )
{
- static const int is_win64 = (sizeof(void *) > sizeof(int));
+ static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
const char *arch = getenv( "WINEARCH" );
int ret;
int reply_pipe[2];
diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
index 9b0f1eb..5eb9eaf 100644
--- a/dlls/ntdll/signal_arm.c
+++ b/dlls/ntdll/signal_arm.c
@@ -876,12 +876,12 @@ void set_tpidrurw( TEB *teb )
*/
void signal_init_thread( TEB *teb )
{
- static int init_done;
+ static BOOL init_done = FALSE;
if (!init_done)
{
pthread_key_create( &teb_key, NULL );
- init_done = 1;
+ init_done = TRUE;
}
set_tpidrurw( teb );
pthread_setspecific( teb_key, teb );
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 018d84f..ea8835f 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -741,12 +741,12 @@ void signal_free_thread( TEB *teb )
*/
void signal_init_thread( TEB *teb )
{
- static int init_done;
+ static BOOL init_done = FALSE;
if (!init_done)
{
pthread_key_create( &teb_key, NULL );
- init_done = 1;
+ init_done = TRUE;
}
pthread_setspecific( teb_key, teb );
}
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index b29405b..815caf7 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -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 = FALSE; /* 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 );
diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c
index ac8095a..e65eef5 100644
--- a/dlls/ntdll/signal_powerpc.c
+++ b/dlls/ntdll/signal_powerpc.c
@@ -999,12 +999,12 @@ void signal_free_thread( TEB *teb )
*/
void signal_init_thread( TEB *teb )
{
- static int init_done;
+ static BOOL init_done = FALSE;
if (!init_done)
{
pthread_key_create( &teb_key, NULL );
- init_done = 1;
+ init_done = TRUE;
}
pthread_setspecific( teb_key, teb );
}
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 8bcf71b..b28cb99 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -814,7 +814,7 @@ static const char *dwarf_reg_names[NB_FRAME_REGS] =
/* 33-40 */ "%st0", "%st1", "%st2", "%st3", "%st4", "%st5", "%st6", "%st7"
};
-static int valid_reg( ULONG_PTR reg )
+static BOOL valid_reg( ULONG_PTR reg )
{
if (reg >= NB_FRAME_REGS) FIXME( "unsupported reg %lx\n", reg );
return (reg < NB_FRAME_REGS);
@@ -1383,7 +1383,7 @@ static inline void *get_signal_stack(void)
*
* Check if pointer is inside the signal stack.
*/
-static inline int is_inside_signal_stack( void *ptr )
+static inline BOOL is_inside_signal_stack( void *ptr )
{
return ((char *)ptr >= (char *)get_signal_stack() &&
(char *)ptr < (char *)get_signal_stack() + signal_stack_size);
diff --git a/dlls/ntdll/string.c b/dlls/ntdll/string.c
index e7a1a61..2a006f1 100644
--- a/dlls/ntdll/string.c
+++ b/dlls/ntdll/string.c
@@ -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 */
diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index 2b810d4..c398878 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -96,9 +96,9 @@ static const int MonthLengths[2][MONSPERYEAR] =
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
-static inline int IsLeapYear(int Year)
+static inline BOOL IsLeapYear(int Year)
{
- return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0;
+ return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0);
}
/* return a monotonic time counter, in Win32 ticks */
diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c
index 1939c76..f4b1093 100644
--- a/dlls/ntdll/version.c
+++ b/dlls/ntdll/version.c
@@ -476,7 +476,7 @@ void version_init( const WCHAR *appname )
{
static const WCHAR configW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0};
static const WCHAR appdefaultsW[] = {'A','p','p','D','e','f','a','u','l','t','s','\\',0};
- static const int is_win64 = (sizeof(void *) > sizeof(int));
+ static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
HANDLE root, hkey, config_key;
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index e8a8b50..34d4648 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -135,7 +135,7 @@ static void *user_space_limit;
static void *working_set_limit;
static void *address_space_start = (void *)0x10000;
#endif /* __i386__ */
-static const int is_win64 = (sizeof(void *) > sizeof(int));
+static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
#define ROUND_ADDR(addr,mask) \
((void *)((UINT_PTR)(addr) & ~(UINT_PTR)(mask)))
@@ -151,8 +151,8 @@ static const int is_win64 = (sizeof(void *) > sizeof(int));
static HANDLE virtual_heap;
static void *preload_reserve_start;
static void *preload_reserve_end;
-static int use_locks;
-static int force_exec_prot; /* whether to force PROT_EXEC on all PROT_READ mmaps */
+static BOOL use_locks = FALSE;
+static BOOL force_exec_prot = FALSE; /* whether to force PROT_EXEC on all PROT_READ mmaps */
/***********************************************************************
@@ -410,7 +410,7 @@ static void remove_reserved_area( void *addr, size_t size )
*
* Check if an address range goes beyond a given limit.
*/
-static inline int is_beyond_limit( const void *addr, size_t size, const void *limit )
+static inline BOOL is_beyond_limit( const void *addr, size_t size, const void *limit )
{
return (addr >= limit || (const char *)addr + size > (const char *)limit);
}
@@ -1452,7 +1452,7 @@ void virtual_init(void)
*/
void virtual_init_threading(void)
{
- use_locks = 1;
+ use_locks = TRUE;
}
diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c
index 7f0035d..acdb33a 100644
--- a/dlls/ntdll/wcstring.c
+++ b/dlls/ntdll/wcstring.c
@@ -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 */
--
1.8.4.1
More information about the wine-patches
mailing list