diff options
author | Rich Salz <rsalz@akamai.com> | 2019-08-16 18:05:08 -0400 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2019-09-19 09:27:38 -0400 |
commit | 51ba9ebd09bfa3569fee935ef7063394820cd333 (patch) | |
tree | f6afae6afd403f04cd0842ff6e588f5d68251a66 /crypto/evp/evp_lib.c | |
parent | 8c0e76813af6a886f66d3e95b908c6c924d2a6ad (diff) |
Avoid ?: construct in XXXerr calls
It either makes the flow of control simpler and more obvious, or it is
just a "cleanup" so that the editing scripts will find and fixup things.
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9441)
Diffstat (limited to 'crypto/evp/evp_lib.c')
-rw-r--r-- | crypto/evp/evp_lib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index e48c63037e..4ec880fd13 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -60,10 +60,10 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) } } else ret = -1; - if (ret <= 0) - EVPerr(EVP_F_EVP_CIPHER_PARAM_TO_ASN1, ret == -2 ? - ASN1_R_UNSUPPORTED_CIPHER : - EVP_R_CIPHER_PARAMETER_ERROR); + if (ret == -2) + EVPerr(EVP_F_EVP_CIPHER_PARAM_TO_ASN1, ASN1_R_UNSUPPORTED_CIPHER); + else if (ret <= 0) + EVPerr(EVP_F_EVP_CIPHER_PARAM_TO_ASN1, EVP_R_CIPHER_PARAMETER_ERROR); if (ret < -1) ret = -1; return ret; @@ -106,10 +106,10 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) } } else ret = -1; - if (ret <= 0) - EVPerr(EVP_F_EVP_CIPHER_ASN1_TO_PARAM, ret == -2 ? - EVP_R_UNSUPPORTED_CIPHER : - EVP_R_CIPHER_PARAMETER_ERROR); + if (ret == -2) + EVPerr(EVP_F_EVP_CIPHER_ASN1_TO_PARAM, EVP_R_UNSUPPORTED_CIPHER); + else if (ret <= 0) + EVPerr(EVP_F_EVP_CIPHER_ASN1_TO_PARAM, EVP_R_CIPHER_PARAMETER_ERROR); if (ret < -1) ret = -1; return ret; |