free cleanup almost the finale
[oweals/openssl.git] / crypto / evp / bio_b64.c
index 538b5202643a7e846609f0583b0def5e3906cd04..fe772fc34fcf4b11380edb1b2ca52429ad94f79a 100644 (file)
@@ -115,7 +115,7 @@ static int b64_new(BIO *bi)
 {
     BIO_B64_CTX *ctx;
 
-    ctx = (BIO_B64_CTX *)OPENSSL_malloc(sizeof(BIO_B64_CTX));
+    ctx = OPENSSL_malloc(sizeof(BIO_B64_CTX));
     if (ctx == NULL)
         return (0);
 
@@ -298,11 +298,7 @@ static int b64_read(BIO *b, char *out, int outl)
         if (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL) {
             int z, jj;
 
-#if 0
-            jj = (i >> 2) << 2;
-#else
             jj = i & ~3;        /* process per 4 */
-#endif
             z = EVP_DecodeBlock((unsigned char *)ctx->buf,
                                 (unsigned char *)ctx->tmp, jj);
             if (jj > 2) {