Commit 563d229b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Avoid TRUE:FALSE conditional expressions.

parent 4d28aeda
......@@ -1024,7 +1024,7 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
case BFFM_ENABLEOK:
TRACE("Enable %ld\n", lParam);
EnableWindow(GetDlgItem(hWnd, 1), (lParam)?TRUE:FALSE);
EnableWindow(GetDlgItem(hWnd, 1), lParam != 0);
break;
case BFFM_SETOKTEXT: /* unicode only */
......
......@@ -1814,7 +1814,7 @@ BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
{
TRACE("(%p)\n",pidl);
return pidl && pidl->mkid.cb ? FALSE : TRUE;
return !pidl || !pidl->mkid.cb;
}
BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
......
......@@ -2855,12 +2855,8 @@ BOOL WINAPI SHGetSpecialFolderPathA (
int nFolder,
BOOL bCreate)
{
return (SHGetFolderPathA(
hwndOwner,
nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0),
NULL,
0,
szPath)) == S_OK ? TRUE : FALSE;
return SHGetFolderPathA(hwndOwner, nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), NULL, 0,
szPath) == S_OK;
}
/*************************************************************************
......@@ -2872,12 +2868,8 @@ BOOL WINAPI SHGetSpecialFolderPathW (
int nFolder,
BOOL bCreate)
{
return (SHGetFolderPathW(
hwndOwner,
nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0),
NULL,
0,
szPath)) == S_OK ? TRUE : FALSE;
return SHGetFolderPathW(hwndOwner, nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), NULL, 0,
szPath) == S_OK;
}
/*************************************************************************
......
......@@ -1705,10 +1705,7 @@ ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject,
TRACE ("(%p)->(DataObject=%p)\n", This, pDataObject);
InitFormatEtc (fmt, This->cfShellIDList, TYMED_HGLOBAL);
This->fAcceptFmt = (S_OK == IDataObject_QueryGetData (pDataObject, &fmt)) ?
TRUE : FALSE;
This->fAcceptFmt = IDataObject_QueryGetData (pDataObject, &fmt) == S_OK;
ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect);
return S_OK;
......
......@@ -290,9 +290,9 @@ static void CheckToolbar(IShellViewImpl * This)
if (IsInCommDlg(This))
{
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
FCIDM_TB_SMALLICON, (This->FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result);
FCIDM_TB_SMALLICON, This->FolderSettings.ViewMode == FVM_LIST, &result);
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
FCIDM_TB_REPORTVIEW, (This->FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result);
FCIDM_TB_REPORTVIEW, This->FolderSettings.ViewMode == FVM_DETAILS, &result);
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON,
FCIDM_TB_SMALLICON, TRUE, &result);
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON,
......@@ -606,7 +606,7 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/
lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/
lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
return (-1==ListView_InsertItemW(This->hWndList, &lvItem))? FALSE: TRUE;
return ListView_InsertItemW(This->hWndList, &lvItem) != -1;
}
/**********************************************************
......
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