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 /crypto/dh/dh_ameth.c | |
parent | 190c8c60c11467424910605d8d0098ccc1168fdc (diff) | |
download | openssl-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/dh/dh_ameth.c')
-rw-r--r-- | crypto/dh/dh_ameth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index c9374b77f9..b45173e2a8 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -327,7 +327,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent, ASN1_PCTX *ctx, int ptype) { unsigned char *m = NULL; - int reason = ERR_R_BUF_LIB, ret = 0; + int reason = ERR_R_BUF_LIB; size_t buf_len = 0; const char *ktype = NULL; @@ -415,13 +415,13 @@ static int do_dh_print(BIO *bp, const DH *x, int indent, goto err; } - ret = 1; - if (0) { + OPENSSL_free(m); + return 1; + err: - DHerr(DH_F_DO_DH_PRINT, reason); - } + DHerr(DH_F_DO_DH_PRINT, reason); OPENSSL_free(m); - return (ret); + return 0; } static int int_dh_size(const EVP_PKEY *pkey) |