Use p==NULL not !p (in if statements, mainly)
[openssl.git] / engines / ccgost / gost_ameth.c
index 0b694f5cf165920b4c7967f991b4781a1b8612ba..5ca3a6e62954129f61f58be9cb9ae2fe0a341177 100644 (file)
@@ -200,7 +200,7 @@ BIGNUM *gost_get0_priv_key(const EVP_PKEY *pkey)
             if (!ec) {
                 return NULL;
             }
-            if (!(priv = EC_KEY_get0_private_key(ec)))
+            if ((priv = EC_KEY_get0_private_key(ec)) == NULL)
                 return NULL;
             return (BIGNUM *)priv;
         }
@@ -848,9 +848,7 @@ static int pkey_bits_gost(const EVP_PKEY *pk)
 /* ---------------------- ASN1 METHOD for GOST MAC  -------------------*/
 static void mackey_free_gost(EVP_PKEY *pk)
 {
-    if (pk->pkey.ptr) {
-        OPENSSL_free(pk->pkey.ptr);
-    }
+    OPENSSL_free(pk->pkey.ptr);
 }
 
 static int mac_ctrl_gost(EVP_PKEY *pkey, int op, long arg1, void *arg2)