Rename some BUF_xxx to OPENSSL_xxx
[openssl.git] / crypto / rsa / rsa_depr.c
index 8da6ec12380a921ef3f93431f01a16b676a6c085..5bd02758565ca333dc4c2b50a94c72542768c40a 100644 (file)
@@ -60,7 +60,7 @@
 
 #include <stdio.h>
 #include <time.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
 #include <openssl/bn.h>
 #include <openssl/rsa.h>
 
@@ -78,7 +78,7 @@ RSA *RSA_generate_key(int bits, unsigned long e_value,
     RSA *rsa = RSA_new();
     BIGNUM *e = BN_new();
 
-    if (!cb || !rsa || !e)
+    if (cb == NULL || rsa == NULL || e == NULL)
         goto err;
 
     /*
@@ -99,11 +99,9 @@ RSA *RSA_generate_key(int bits, unsigned long e_value,
         return rsa;
     }
  err:
-    if (e)
-        BN_free(e);
+    BN_free(e);
     RSA_free(rsa);
-    if (cb)
-        BN_GENCB_free(cb);
+    BN_GENCB_free(cb);
     return 0;
 }
 #endif