Merge duplicated else/#else branch

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-10 15:59:02 +02:00 committed by Paul Bakker
parent da7317ed00
commit 85dfe08b31

View file

@ -1697,6 +1697,7 @@ int x509parse_csr( x509_csr *csr, const unsigned char *buf, size_t buflen )
return( ret ); return( ret );
} }
else else
#endif
{ {
/* /*
* nope, copy the raw DER data * nope, copy the raw DER data
@ -1710,16 +1711,6 @@ int x509parse_csr( x509_csr *csr, const unsigned char *buf, size_t buflen )
buflen = 0; buflen = 0;
} }
#else
p = (unsigned char *) polarssl_malloc( len = buflen );
if( p == NULL )
return( POLARSSL_ERR_X509_MALLOC_FAILED );
memcpy( p, buf, buflen );
buflen = 0;
#endif
csr->raw.p = p; csr->raw.p = p;
csr->raw.len = len; csr->raw.len = len;
@ -1926,6 +1917,7 @@ int x509parse_crl( x509_crl *chain, const unsigned char *buf, size_t buflen )
return( ret ); return( ret );
} }
else else
#endif
{ {
/* /*
* nope, copy the raw DER data * nope, copy the raw DER data
@ -1939,16 +1931,6 @@ int x509parse_crl( x509_crl *chain, const unsigned char *buf, size_t buflen )
buflen = 0; buflen = 0;
} }
#else
p = (unsigned char *) polarssl_malloc( len = buflen );
if( p == NULL )
return( POLARSSL_ERR_X509_MALLOC_FAILED );
memcpy( p, buf, buflen );
buflen = 0;
#endif
crl->raw.p = p; crl->raw.p = p;
crl->raw.len = len; crl->raw.len = len;