You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/08/21 12:08:22 UTC
[nuttx-apps] branch master updated: testing: Check CONFIG_TLS_NELEM is defined before using it
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6716f15d7 testing: Check CONFIG_TLS_NELEM is defined before using it
6716f15d7 is described below
commit 6716f15d7b18284988a9ad9f53712c22c89cc48c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Aug 21 16:07:26 2023 +0800
testing: Check CONFIG_TLS_NELEM is defined before using it
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
testing/ostest/ostest_main.c | 2 +-
testing/ostest/tls.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index 2f7a05c15..2de06fca2 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -300,7 +300,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
-#if CONFIG_TLS_NELEM > 0
+#if defined(CONFIG_TLS_NELEM) && CONFIG_TLS_NELEM > 0
/* Test TLS */
tls_test();
diff --git a/testing/ostest/tls.c b/testing/ostest/tls.c
index 56c5ecddb..7ae461cc6 100644
--- a/testing/ostest/tls.c
+++ b/testing/ostest/tls.c
@@ -33,7 +33,7 @@
#include "ostest.h"
-#if CONFIG_TLS_NELEM > 0
+#if defined(CONFIG_TLS_NELEM) && CONFIG_TLS_NELEM > 0
/****************************************************************************
* Preprocessor Definitions