summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorMichaël Lefèvre <lefevre00@yahoo.fr>2015-03-12 20:57:33 +0100
committerMichael Stahl <mstahl@redhat.com>2015-03-12 22:28:38 +0000
commitc3cd1005568469dc2514627c76378c2f84da2b0d (patch)
tree5457b8cda8b2afeea297e551ce45b3bb80985e98 /connectivity
parent6d15c85759d25807cf88561ac3d05cae5f15a169 (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.cxx5
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) );
}