summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-11 09:06:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-11 09:58:36 +0000
commit556373c41fddbac6cbee1c89e7707631270a1852 (patch)
tree026862690693419beb8810fdc6671ae30c72a026 /svl
parent62b124b2704adf11a63681164d05a8eb49dfb105 (diff)
V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/slstitm.cxx13
-rw-r--r--svl/source/numbers/zforlist.cxx2
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx5
-rw-r--r--svl/source/svdde/ddesvr.cxx2
4 files changed, 7 insertions, 15 deletions
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 1b0f35cad942..5221e46a94a3 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -60,9 +60,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUStri
if( pList /*!!! && pList->Count() */ )
{
pImp = new SfxImpStringList;
-
- if (pImp)
- pImp->aList = *pList;
+ pImp->aList = *pList;
}
}
@@ -255,12 +253,9 @@ void SfxStringListItem::SetStringList( const com::sun::star::uno::Sequence< OUSt
pImp->nRefCount--;
pImp = new SfxImpStringList;
- if (pImp)
- {
- // String belongs to the list
- for ( sal_Int32 n = 0; n < rList.getLength(); n++ )
- pImp->aList.push_back(rList[n]);
- }
+ // String belongs to the list
+ for ( sal_Int32 n = 0; n < rList.getLength(); n++ )
+ pImp->aList.push_back(rList[n]);
}
void SfxStringListItem::GetStringList( com::sun::star::uno::Sequence< OUString >& rList ) const
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index e18281254f07..218fdb16e458 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1680,7 +1680,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n
pStringScanner,
nCheckPos,
ActLnge);
- if ( !pFormat || !(nCheckPos == 0) )
+ if (nCheckPos != 0)
{
if (LocaleDataWrapper::areChecksEnabled())
{
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 779cc64af4ed..889ed3074ff3 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -399,9 +399,8 @@ PasswordContainer::PasswordContainer( const Reference<XMultiServiceFactory>& xSe
mComponent->addEventListener( this );
m_pStorageFile = new StorageItem( this, OUString("Office.Common/Passwords") );
- if( m_pStorageFile )
- if( m_pStorageFile->useStorage() )
- m_aContainer = m_pStorageFile->getInfo();
+ if( m_pStorageFile->useStorage() )
+ m_aContainer = m_pStorageFile->getInfo();
}
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 1dd711083377..952dfe9fb6b5 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -113,8 +113,6 @@ HDDEDATA CALLBACK DdeInternal::SvrCallback(
return (HDDEDATA)NULL;
HSZPAIR* pPairs = new HSZPAIR [nTopics + 1];
- if ( !pPairs )
- return (HDDEDATA)NULL;
HSZPAIR* q = pPairs;
for (DdeServices::iterator aI = rAll.begin(); aI != rAll.end(); ++aI)