diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index 589ba727724..320005133e5 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -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 */ diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 2130b49ff99..58b810418e3 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -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) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 800019fd18e..41730ead1e7 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -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; } /************************************************************************* diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index e724b0762b0..8439da1ec2e 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -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; diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index efd6e0f5edc..4f488ca3439 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -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; } /**********************************************************