[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Mon May 16 19:29:36 UTC 2016


The branch master has been updated
       via  a7f9e0a45f5f35a5fe318461aa03b4afe944af74 (commit)
      from  49445f21da5ad436a117d0d4cc6220c4bbbbf8a7 (commit)


- Log -----------------------------------------------------------------
commit a7f9e0a45f5f35a5fe318461aa03b4afe944af74
Author: Matt Caswell <matt at openssl.org>
Date:   Mon May 16 14:56:53 2016 +0100

    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 at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/evp_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index e02e801..ad64a74 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) {


More information about the openssl-commits mailing list