more OSSL_NELEM cases
[openssl.git] / apps / speed.c
index 08ab9c5fa6deee921846aa0e914ea9fbc3d6cbb3..7a694852dc8117ccced88da4ea271152ada74e00 100644 (file)
@@ -2438,7 +2438,7 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
 {
     static int mblengths[] =
         { 8 * 1024, 2 * 8 * 1024, 4 * 8 * 1024, 8 * 8 * 1024, 8 * 16 * 1024 };
-    int j, count, num = sizeof(lengths) / sizeof(lengths[0]);
+    int j, count, num = OSSL_NELEM(lengths);
     const char *alg_name;
     unsigned char *inp, *out, no_key[32], no_iv[16];
     EVP_CIPHER_CTX ctx;
@@ -2529,8 +2529,6 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
         fprintf(stdout, "\n");
     }
 
-    if (inp)
-        OPENSSL_free(inp);
-    if (out)
-        OPENSSL_free(out);
+    OPENSSL_free(inp);
+    OPENSSL_free(out);
 }