aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/t_x509.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 14:29:48 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 14:29:48 -0400
commit666964780a245c14e8f0eb6e13dd854a37387ea9 (patch)
treed50fcd19525107e6c675ab342e84805da21a684e /crypto/asn1/t_x509.c
parent190c8c60c11467424910605d8d0098ccc1168fdc (diff)
downloadopenssl-666964780a245c14e8f0eb6e13dd854a37387ea9.tar.gz
Remove goto inside an if(0) block
There were a dozen-plus instances of this construct: if (0) { label: ..... } Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/asn1/t_x509.c')
-rw-r--r--crypto/asn1/t_x509.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c
index c32f28efee..76c6c1ecbc 100644
--- a/crypto/asn1/t_x509.c
+++ b/crypto/asn1/t_x509.c
@@ -490,7 +490,7 @@ int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm)
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
{
char *s, *c, *b;
- int ret = 0, l, i;
+ int l, i;
l = 80 - 2 - obase;
@@ -535,11 +535,10 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
l--;
}
- ret = 1;
- if (0) {
+ OPENSSL_free(b);
+ return 1;
err:
- X509err(X509_F_X509_NAME_PRINT, ERR_R_BUF_LIB);
- }
+ X509err(X509_F_X509_NAME_PRINT, ERR_R_BUF_LIB);
OPENSSL_free(b);
- return (ret);
+ return 0;
}