Commit abef6ab3 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ntdll: Avoid TRUE:FALSE conditional expressions.

parent 09737c7b
......@@ -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;
......
......@@ -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 )
......
......@@ -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);
......
......@@ -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;
......
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