summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-11 15:56:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-12 10:31:25 +0100
commitf147b160aef1735d34c488353a7d4b875788a7e1 (patch)
treeab3bd613cf016cde906b3fdcbaab4246ca699e1e /xmlsecurity
parent718f540fb63af27c1336f89213444e9af753b8a9 (diff)
clang-analyzer-deadcode.DeadStores
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 4345bb24cdbf..53a48e0e7863 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -182,8 +182,7 @@ void CertificateChooser::ImplInitialize()
{
}
- sal_Int32 nCertificates = xCerts.getLength();
- for( sal_Int32 nCert = nCertificates; nCert; )
+ for( sal_Int32 nCert = xCerts.getLength(); nCert; )
{
uno::Reference< security::XCertificate > xCert = xCerts[ --nCert ];
// Check if we have a private key for this...
@@ -192,7 +191,6 @@ void CertificateChooser::ImplInitialize()
if (!(nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY))
{
::comphelper::removeElementAt( xCerts, nCert );
- nCertificates = xCerts.getLength();
}
}