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>
This commit is contained in:
Matt Caswell 2016-05-16 14:56:53 +01:00
parent 49445f21da
commit a7f9e0a45f

View file

@ -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) {