summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-05-16 14:56:53 +0100
committerMatt Caswell <matt@openssl.org>2016-05-16 20:28:03 +0100
commita7f9e0a45f5f35a5fe318461aa03b4afe944af74 (patch)
treef713ff4a9c643559a0a447b0c19907f09fea04c8 /crypto
parent49445f21da5ad436a117d0d4cc6220c4bbbbf8a7 (diff)
Remove an unneccessary check of cipher
Due to short-circuiting we only need to check "cipher" for NULL once. PR#699 Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/evp_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index e02e801949..ad64a74bb4 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -120,7 +120,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
* reinitialisation, when it may all be unnecessary.
*/
if (ctx->engine && ctx->cipher
- && (!cipher || (cipher && (cipher->nid == ctx->cipher->nid))))
+ && (cipher == NULL || cipher->nid == ctx->cipher->nid))
goto skip_to_init;
#endif
if (cipher) {