ole32: Avoid TRUE:FALSE conditional expressions.

This commit is contained in:
Michael Stefaniuc 2012-08-08 10:13:54 +02:00 committed by Alexandre Julliard
parent 794ad90982
commit 43ae84636a
5 changed files with 7 additions and 8 deletions

View File

@ -3769,10 +3769,9 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
{ {
TRACE("waiting for rpc completion\n"); TRACE("waiting for rpc completion\n");
res = WaitForMultipleObjectsEx(cHandles, pHandles, res = WaitForMultipleObjectsEx(cHandles, pHandles, (dwFlags & COWAIT_WAITALL) != 0,
(dwFlags & COWAIT_WAITALL) ? TRUE : FALSE,
(dwTimeout == INFINITE) ? INFINITE : start_time + dwTimeout - now, (dwTimeout == INFINITE) ? INFINITE : start_time + dwTimeout - now,
(dwFlags & COWAIT_ALERTABLE) ? TRUE : FALSE); (dwFlags & COWAIT_ALERTABLE) != 0);
} }
switch (res) switch (res)

View File

@ -1899,7 +1899,7 @@ static DefaultHandler* DefaultHandler_Construct(
This->IAdviseSink_iface.lpVtbl = &DefaultHandler_IAdviseSink_VTable; This->IAdviseSink_iface.lpVtbl = &DefaultHandler_IAdviseSink_VTable;
This->IPersistStorage_iface.lpVtbl = &DefaultHandler_IPersistStorage_VTable; This->IPersistStorage_iface.lpVtbl = &DefaultHandler_IPersistStorage_VTable;
This->inproc_server = (flags & EMBDHLP_INPROC_SERVER) ? TRUE : FALSE; This->inproc_server = (flags & EMBDHLP_INPROC_SERVER) != 0;
/* /*
* Start with one reference count. The caller of this function * Start with one reference count. The caller of this function

View File

@ -290,7 +290,7 @@ static inline HANDLE get_droptarget_handle(HWND hwnd)
*/ */
static inline BOOL is_droptarget(HWND hwnd) static inline BOOL is_droptarget(HWND hwnd)
{ {
return get_droptarget_handle(hwnd) ? TRUE : FALSE; return get_droptarget_handle(hwnd) != 0;
} }
/************************************************************* /*************************************************************
@ -1660,7 +1660,7 @@ static BOOL OLEMenu_SetIsServerMenu( HMENU hmenu, OleMenuDescriptor *pOleMenuDes
if ( nPos < nWidth ) if ( nPos < nWidth )
{ {
/* Odd elements are server menu widths */ /* Odd elements are server menu widths */
pOleMenuDescriptor->bIsServerItem = (i%2) ? TRUE : FALSE; pOleMenuDescriptor->bIsServerItem = i%2;
break; break;
} }
} }

View File

@ -740,7 +740,7 @@ static void test_cf_dataobject(IDataObject *data)
break; break;
} }
cfs_seen[count] = fmt.cfFormat; cfs_seen[count] = fmt.cfFormat;
ok(fmt_ptr->first_use_of_cf == seen_cf ? FALSE : TRUE, "got %08x expected %08x\n", ok(fmt_ptr->first_use_of_cf != seen_cf, "got %08x expected %08x\n",
fmt_ptr->first_use_of_cf, !seen_cf); fmt_ptr->first_use_of_cf, !seen_cf);
ok(fmt_ptr->res[0] == 0, "got %08x\n", fmt_ptr->res[1]); ok(fmt_ptr->res[0] == 0, "got %08x\n", fmt_ptr->res[1]);
ok(fmt_ptr->res[1] == 0, "got %08x\n", fmt_ptr->res[2]); ok(fmt_ptr->res[1] == 0, "got %08x\n", fmt_ptr->res[2]);

View File

@ -1110,7 +1110,7 @@ static DWORD CALLBACK free_libraries_thread(LPVOID p)
static inline BOOL is_module_loaded(const char *module) static inline BOOL is_module_loaded(const char *module)
{ {
return GetModuleHandle(module) ? TRUE : FALSE; return GetModuleHandle(module) != 0;
} }
static void test_CoFreeUnusedLibraries(void) static void test_CoFreeUnusedLibraries(void)