diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 14:29:48 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 14:29:48 -0400 |
commit | 666964780a245c14e8f0eb6e13dd854a37387ea9 (patch) | |
tree | d50fcd19525107e6c675ab342e84805da21a684e /ssl/ssl_cert.c | |
parent | 190c8c60c11467424910605d8d0098ccc1168fdc (diff) |
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 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index a15c5f9a09..5244ecb447 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -850,12 +850,12 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file) sk_X509_NAME_push(ret, xn); } } + goto done; - if (0) { err: - sk_X509_NAME_pop_free(ret, X509_NAME_free); - ret = NULL; - } + sk_X509_NAME_pop_free(ret, X509_NAME_free); + ret = NULL; + done: sk_X509_NAME_free(sk); BIO_free(in); X509_free(x); @@ -911,17 +911,15 @@ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, } ERR_clear_error(); + goto done; - if (0) { err: ret = 0; - } + done: BIO_free(in); if (x != NULL) X509_free(x); - (void)sk_X509_NAME_set_cmp_func(stack, oldcmp); - return ret; } |