diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2015-03-12 20:57:33 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-03-12 22:28:38 +0000 |
commit | c3cd1005568469dc2514627c76378c2f84da2b0d (patch) | |
tree | 5457b8cda8b2afeea297e551ce45b3bb80985e98 /connectivity | |
parent | 6d15c85759d25807cf88561ac3d05cae5f15a169 (diff) |
CppCheck cleanlyness : reduce variable's scope
Change-Id: I5bd18b1a93f7197121eb42f6b82d2d8d87e7671f
Reviewed-on: https://gerrit.libreoffice.org/14843
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index 73b0c77d20d3..d380f2a9e56a 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx @@ -173,7 +173,6 @@ static nsresult insertPABDescription() } } PR_FREEIF (value); - value=nsnull; if (bSetted == sal_True) { const char* pHisDescription = static_cast< const char* >( getHisDescription( ) ); @@ -218,7 +217,7 @@ static nsresult getSubsFromParent(const OString& aParent, nsIEnumerator **aSubs) nsCOMPtr<nsIRDFDataSource> rdfDirectory ; OString dir("rdf:addressdirectory"); - retCode = rdfService->GetDataSource(dir.getStr(),getter_AddRefs(rdfDirectory)) ; + rdfService->GetDataSource(dir.getStr(),getter_AddRefs(rdfDirectory)) ; @@ -665,7 +664,6 @@ MDatabaseMetaDataHelper::testLDAPConnection( OConnection* _pCon ) { const sal_Unicode QUERY_CHAR = '?'; const sal_Char* MOZ_SCHEMA = "moz-abldapdirectory://"; - const sal_Char* LDAP_SCHEMA = "ldap://"; OString sAbURI; OUString sAbBindDN; @@ -681,6 +679,7 @@ MDatabaseMetaDataHelper::testLDAPConnection( OConnection* _pCon ) sal_Int32 pos = sAbURI.indexOf( MOZ_SCHEMA ); if ( pos != -1 ) { + const sal_Char* LDAP_SCHEMA = "ldap://"; sAbURI = sAbURI.replaceAt (pos, rtl_str_getLength( MOZ_SCHEMA ), OString(LDAP_SCHEMA) ); } |