summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-11 09:06:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-11 09:58:36 +0000
commit556373c41fddbac6cbee1c89e7707631270a1852 (patch)
tree026862690693419beb8810fdc6671ae30c72a026 /xmlsecurity
parent62b124b2704adf11a63681164d05a8eb49dfb105 (diff)
V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx7
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx4
2 files changed, 1 insertions, 10 deletions
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 ,