testing: Check CONFIG_TLS_NELEM is defined before using it

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-08-21 16:07:26 +08:00 committed by Petro Karashchenko
parent 18280fdc25
commit 6716f15d7b
2 changed files with 2 additions and 2 deletions

View File

@ -300,7 +300,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage(); check_test_memory_usage();
#endif #endif
#if CONFIG_TLS_NELEM > 0 #if defined(CONFIG_TLS_NELEM) && CONFIG_TLS_NELEM > 0
/* Test TLS */ /* Test TLS */
tls_test(); tls_test();

View File

@ -33,7 +33,7 @@
#include "ostest.h" #include "ostest.h"
#if CONFIG_TLS_NELEM > 0 #if defined(CONFIG_TLS_NELEM) && CONFIG_TLS_NELEM > 0
/**************************************************************************** /****************************************************************************
* Preprocessor Definitions * Preprocessor Definitions