[Libreoffice-commits] core.git: xmlsecurity/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon May 27 10:58:13 UTC 2019


 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 256fccaf991cbc7d2f954c759e0ada6e2bd26c9e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon May 27 09:43:24 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon May 27 12:57:16 2019 +0200

    operator new doesn't return null anyway
    
    (and assigning nullptr to a null xcert was apparently redundant)
    
    Change-Id: I8b6120248c042adcb2f787b8db0f28c14268212d
    Reviewed-on: https://gerrit.libreoffice.org/73019
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index a5015bc87c55..7c0b4f2af489 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -797,11 +797,7 @@ X509Certificate_NssImpl* NssCertToXCert( CERTCertificate* cert )
 
     if( cert != nullptr ) {
         xcert = new X509Certificate_NssImpl() ;
-        if( xcert == nullptr ) {
-            xcert = nullptr ;
-        } else {
-            xcert->setCert( cert ) ;
-        }
+        xcert->setCert( cert ) ;
     } else {
         xcert = nullptr ;
     }


More information about the Libreoffice-commits mailing list