Commit 86fdca67 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

ntdll: Use BOOL type where appropriate.

parent eba2f432
......@@ -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
}
......
......@@ -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);
......
......@@ -53,7 +53,7 @@ struct loadorder_list
static const WCHAR separatorsW[] = {',',' ','\t',0};
static int init_done;
static BOOL init_done;
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" ))
......
......@@ -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;
if (!init_done)
{
uname( &buf );
init_done = 1;
init_done = TRUE;
}
if (sysname) *sysname = buf.sysname;
if (release) *release = buf.release;
......
......@@ -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;
}
......
......@@ -876,12 +876,12 @@ void set_tpidrurw( TEB *teb )
*/
void signal_init_thread( TEB *teb )
{
static int init_done;
static BOOL init_done;
if (!init_done)
{
pthread_key_create( &teb_key, NULL );
init_done = 1;
init_done = TRUE;
}
set_tpidrurw( teb );
pthread_setspecific( teb_key, teb );
......
......@@ -741,12 +741,12 @@ void signal_free_thread( TEB *teb )
*/
void signal_init_thread( TEB *teb )
{
static int init_done;
static BOOL init_done;
if (!init_done)
{
pthread_key_create( &teb_key, NULL );
init_done = 1;
init_done = TRUE;
}
pthread_setspecific( teb_key, teb );
}
......
......@@ -999,12 +999,12 @@ void signal_free_thread( TEB *teb )
*/
void signal_init_thread( TEB *teb )
{
static int init_done;
static BOOL init_done;
if (!init_done)
{
pthread_key_create( &teb_key, NULL );
init_done = 1;
init_done = TRUE;
}
pthread_setspecific( teb_key, teb );
}
......
......@@ -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 */
......
......@@ -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;
......
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