summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2015-10-25 14:37:11 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-10-25 22:31:44 +0000
commit0b018d202dfcf4bb16b708e10085a4146243b0a0 (patch)
tree4a00a62a88666944f6e7178ab70c497a090becc2 /cui
parentce463679a5a362d5c3f7c146f70b6be838ddbb2d (diff)
tdf#39440: fix several warnings reported by cppcheck
Change-Id: I560d28b7cc67740c6479494d0e5aa62d2ac6ffae Reviewed-on: https://gerrit.libreoffice.org/19587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optlingu.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index af8ce6356245..0348f2b9d7e7 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -616,17 +616,18 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( sal_Int16 nLang, sal
ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( const OUString &rSvcImplName )
{
- ServiceInfo_Impl* pInfo = 0;
- for (sal_uLong i = 0; i < nDisplayServices && !pInfo; ++i)
+ for (sal_uLong i = 0; i < nDisplayServices; ++i)
{
ServiceInfo_Impl &rTmp = aDisplayServiceArr[ i ];
if (rTmp.sSpellImplName == rSvcImplName ||
rTmp.sHyphImplName == rSvcImplName ||
rTmp.sThesImplName == rSvcImplName ||
rTmp.sGrammarImplName == rSvcImplName)
- pInfo = &rTmp;
+ {
+ return &rTmp;
+ }
}
- return pInfo;
+ return 0;
}