Remove an unneccessary check of cipher
[openssl.git] / crypto / evp / evp_enc.c
index e02e801949c0eb883ad8def26f63875ec6dda2ed..ad64a74bb415165adf7b6466c58df03fba80dde1 100644 (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) {