From 556373c41fddbac6cbee1c89e7707631270a1852 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 11 Mar 2015 09:06:08 +0000 Subject: V668 no sense in testing the result of new against null Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39 --- .../source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx | 7 +------ xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 4 ---- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index d52fc223afdc..e7af2df809da 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -770,9 +770,6 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl :: createCertificateFr if( rawCertificate.getLength() > 0 ) { xcert = new X509Certificate_MSCryptImpl() ; - if( xcert == NULL ) - throw RuntimeException() ; - xcert->setRawCert( rawCertificate ) ; } else { xcert = NULL ; @@ -1064,9 +1061,7 @@ X509Certificate_MSCryptImpl* MswcryCertContextToXCert( PCCERT_CONTEXT cert ) if( cert != NULL ) { xcert = new X509Certificate_MSCryptImpl() ; - if( xcert != NULL ) { - xcert->setMswcryCert( cert ) ; - } + xcert->setMswcryCert( cert ) ; } else { xcert = NULL ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index d39846bc5839..8faef3a597de 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -210,8 +210,6 @@ OUString SAL_CALL X509Certificate_MSCryptImpl :: getIssuerName() throw ( ::com:: // Here the cbIssuer count the last 0x00 , take care. if( cbIssuer != 0 ) { char* issuer = new char[ cbIssuer ] ; - if( issuer == NULL ) - throw RuntimeException() ; cbIssuer = CertNameToStr( X509_ASN_ENCODING | PKCS_7_ASN_ENCODING , @@ -260,8 +258,6 @@ OUString SAL_CALL X509Certificate_MSCryptImpl :: getSubjectName() throw ( ::com: if( cbSubject != 0 ) { wchar_t* subject = new wchar_t[ cbSubject ] ; - if( subject == NULL ) - throw RuntimeException() ; cbSubject = CertNameToStrW( X509_ASN_ENCODING | PKCS_7_ASN_ENCODING , -- cgit