From 2a1c5f5382a3a39ffaa432e0c0c84681db4c5c52 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Wed, 19 Oct 2011 14:15:17 +0000
Subject: [PATCH] - Minor code cleanup
---
library/x509parse.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/library/x509parse.c b/library/x509parse.c
index b28e9bba3..d97efff48 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -289,7 +289,10 @@ static int x509_get_version( unsigned char **p,
ASN1_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED | 0 ) ) != 0 )
{
if( ret == POLARSSL_ERR_ASN1_UNEXPECTED_TAG )
- return( *ver = 0 );
+ {
+ *ver = 0;
+ return( 0 );
+ }
return( ret );
}
@@ -318,7 +321,10 @@ static int x509_crl_get_version( unsigned char **p,
if( ( ret = asn1_get_int( p, end, ver ) ) != 0 )
{
if( ret == POLARSSL_ERR_ASN1_UNEXPECTED_TAG )
- return( *ver = 0 );
+ {
+ *ver = 0;
+ return( 0 );
+ }
return( POLARSSL_ERR_X509_CERT_INVALID_VERSION + ret );
}