]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove redundant RAND_get0_private() call
authorPauli <pauli@openssl.org>
Tue, 26 Oct 2021 22:22:09 +0000 (08:22 +1000)
committerPauli <pauli@openssl.org>
Thu, 28 Oct 2021 08:05:09 +0000 (18:05 +1000)
The test called this twice which doesn't hurt but isn't ideal.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/16921)

test/rand_test.c

index 864f3cdb51ef65beacebf072e156fc97a13c186b..c6cf32610eb360ae0863e2d12b278e4713d89486 100644 (file)
@@ -21,9 +21,6 @@ static int test_rand(void)
     unsigned char entropy2[] = { 0xff, 0xfe, 0xfd };
     unsigned char outbuf[3];
 
-    if (!TEST_ptr(privctx = RAND_get0_private(NULL)))
-        return 0;
-
     *p++ = OSSL_PARAM_construct_octet_string(OSSL_RAND_PARAM_TEST_ENTROPY,
                                              entropy1, sizeof(entropy1));
     *p = OSSL_PARAM_construct_end();