From b6d6dab920a9e14a6fe9c61446da64ab62dcbfdf Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 10 Mar 2015 13:07:45 +0000 Subject: V668 no sense in testing the result of new against null Change-Id: I1cff71d15f4d1b5ee47cc734b3fc2168d7f99201 --- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 6 +++--- dbaccess/source/ui/misc/WNameMatch.cxx | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index eeb3bd442440..ec19a524f369 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -548,10 +548,10 @@ namespace dbaui const bool bExists = bIsFile? aCheckExistence.isDocument(): aCheckExistence.isFolder(); eExists = bExists? PATH_EXIST: PATH_NOT_EXIST; } - catch(const Exception&) + catch (const Exception&) { - eExists = ( pHandler && pHandler->isDoesNotExist() ) ? PATH_NOT_EXIST: (bIsFile ? PATH_NOT_EXIST : PATH_NOT_KNOWN); - } + eExists = pHandler->isDoesNotExist() ? PATH_NOT_EXIST : (bIsFile ? PATH_NOT_EXIST : PATH_NOT_KNOWN); + } return eExists; } bool OConnectionHelper::PreNotify( NotifyEvent& _rNEvt ) diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 8126f1cf804a..6ff753110814 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -363,8 +363,7 @@ void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, co { DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind); SvLBoxString* pString = new OColumnString(pEntry, 0, rStr,false); - if (pString) - pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 ); + pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 ); } bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, bool bSelect ) -- cgit