summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-19 16:18:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-20 19:51:14 +0200
commit83c82bbb73dec5e3ba82e81b09824cd223e575a7 (patch)
treea45fa38db7bd971bfeee25ca3fb3543f0733709e /xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
parent5145882f8f33ce2588722ae7439fc47d1cdcaaf6 (diff)
pvs-studio: A part of conditional expression is always true: bSigValid.
Change-Id: I4da53c79bb9e47548338d3e348677049e664bf8d Reviewed-on: https://gerrit.libreoffice.org/62053 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 6a5a5936c833..61300fdf6156 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -571,7 +571,6 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
OUString aDescription;
OUString aType;
- bool bSigValid = false;
bool bCertValid = false;
if( xCert.is() )
{
@@ -622,7 +621,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
aType = "PDF";
}
- bSigValid = ( rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED );
+ bool bSigValid = rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
if ( bSigValid )
{
@@ -638,7 +637,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
{
aImage = m_pSigsInvalidImg->GetImage();
}
- else if (bSigValid && !bCertValid)
+ else if (!bCertValid)
{
aImage = m_pSigsNotvalidatedImg->GetImage();
}
@@ -647,20 +646,20 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
// If there is no storage, then it's pointless to check storage
// stream references.
else if (maSignatureManager.meSignatureMode == DocumentSignatureMode::Content
- && bSigValid && bCertValid && (maSignatureManager.mxStore.is() && !DocumentSignatureHelper::isOOo3_2_Signature(
+ && bCertValid && (maSignatureManager.mxStore.is() && !DocumentSignatureHelper::isOOo3_2_Signature(
maSignatureManager.maCurrentSignatureInformations[n])))
{
aImage = m_pSigsNotvalidatedImg->GetImage();
bAllNewSignatures = false;
}
else if (maSignatureManager.meSignatureMode == DocumentSignatureMode::Content
- && bSigValid && bCertValid && DocumentSignatureHelper::isOOo3_2_Signature(
+ && bCertValid && DocumentSignatureHelper::isOOo3_2_Signature(
maSignatureManager.maCurrentSignatureInformations[n]))
{
aImage = m_pSigsValidImg->GetImage();
}
else if (maSignatureManager.meSignatureMode == DocumentSignatureMode::Macros
- && bSigValid && bCertValid)
+ && bCertValid)
{
aImage = m_pSigsValidImg->GetImage();
}