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:
parent
49445f21da
commit
a7f9e0a45f
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue