mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
tests: crypto: mbedtls: Remove local implementation of rand()
When MBEDTLS_RSA_C is defined, mbedtls define its local version of rand() function. Since we already have rand() in our minimal libc, we can safely remove this. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit is contained in:
committed by
Christopher Friedt
parent
b2fde24c4c
commit
5e535a8551
@@ -5,3 +5,4 @@ CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h"
|
||||
CONFIG_MBEDTLS_TEST=y
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_MINIMAL_LIBC_RAND=y
|
||||
|
||||
@@ -72,20 +72,6 @@
|
||||
#include "mbedtls/memory_buffer_alloc.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_RSA_C)
|
||||
int rand(void)
|
||||
{
|
||||
static ZTEST_DMEM uint32_t seed = 7U;
|
||||
|
||||
seed ^= seed << 13;
|
||||
seed ^= seed >> 17;
|
||||
seed ^= seed << 5;
|
||||
|
||||
return seed;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int test_snprintf(size_t n, const char ref_buf[10], int ref_ret)
|
||||
{
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user