ntdll: Avoid TRUE:FALSE conditional expressions.

This commit is contained in:
Michael Stefaniuc 2012-08-09 09:32:54 +02:00 committed by Alexandre Julliard
parent 09737c7b8d
commit abef6ab366
4 changed files with 7 additions and 7 deletions

View File

@ -610,7 +610,7 @@ NTSTATUS WINAPI NtPrivilegeCheck(
SERVER_START_REQ( check_token_privileges )
{
req->handle = wine_server_obj_handle( ClientToken );
req->all_required = ((RequiredPrivileges->Control & PRIVILEGE_SET_ALL_NECESSARY) ? TRUE : FALSE);
req->all_required = (RequiredPrivileges->Control & PRIVILEGE_SET_ALL_NECESSARY) != 0;
wine_server_add_data( req, RequiredPrivileges->Privilege,
RequiredPrivileges->PrivilegeCount * sizeof(RequiredPrivileges->Privilege[0]) );
wine_server_set_reply( req, RequiredPrivileges->Privilege,
@ -619,7 +619,7 @@ NTSTATUS WINAPI NtPrivilegeCheck(
status = wine_server_call( req );
if (status == STATUS_SUCCESS)
*Result = (reply->has_privileges ? TRUE : FALSE);
*Result = reply->has_privileges != 0;
}
SERVER_END_REQ;
return status;

View File

@ -244,7 +244,7 @@ static inline BOOL pf_is_integer_format( char fmt )
static const char float_fmts[] = "diouxX";
if (!fmt)
return FALSE;
return strchr( float_fmts, fmt ) ? TRUE : FALSE;
return strchr( float_fmts, fmt ) != 0;
}
static inline BOOL pf_is_double_format( char fmt )
@ -252,7 +252,7 @@ static inline BOOL pf_is_double_format( char fmt )
static const char float_fmts[] = "aeEfgG";
if (!fmt)
return FALSE;
return strchr( float_fmts, fmt ) ? TRUE : FALSE;
return strchr( float_fmts, fmt ) != 0;
}
static inline BOOL pf_is_valid_format( char fmt )
@ -260,7 +260,7 @@ static inline BOOL pf_is_valid_format( char fmt )
static const char float_fmts[] = "acCdeEfgGinouxX";
if (!fmt)
return FALSE;
return strchr( float_fmts, fmt ) ? TRUE : FALSE;
return strchr( float_fmts, fmt ) != 0;
}
static void pf_rebuild_format_string( char *p, pf_flags *flags )

View File

@ -956,7 +956,7 @@ static ULONG NTDLL_FindRuns(PCRTL_BITMAP lpBits, PRTL_BITMAP_RUN lpSeries,
ULONG ulCount, BOOLEAN bLongest,
ULONG (*fn)(PCRTL_BITMAP,ULONG,PULONG))
{
BOOL bNeedSort = ulCount > 1 ? TRUE : FALSE;
BOOL bNeedSort = ulCount > 1;
ULONG ulPos = 0, ulRuns = 0;
TRACE("(%p,%p,%d,%d)\n", lpBits, lpSeries, ulCount, bLongest);

View File

@ -344,7 +344,7 @@ static DWORD CALLBACK wait_thread_proc(LPVOID Arg)
{
struct wait_work_item *wait_work_item = Arg;
NTSTATUS status;
BOOLEAN alertable = (wait_work_item->Flags & WT_EXECUTEINIOTHREAD) ? TRUE : FALSE;
BOOLEAN alertable = (wait_work_item->Flags & WT_EXECUTEINIOTHREAD) != 0;
HANDLE handles[2] = { wait_work_item->Object, wait_work_item->CancelEvent };
LARGE_INTEGER timeout;
HANDLE completion_event;