Skip to content

Commit

Permalink
Check _DEBUG is defined before using it
Browse files Browse the repository at this point in the history
to avoid the preprocess warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4ae1eb8533563d377ec8614f0c9428c8734e1f2c
  • Loading branch information
xiaoxiang781216 committed Mar 9, 2021
1 parent deff9ab commit f94029a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tlsf.c
Expand Up @@ -1045,8 +1045,8 @@ void tlsf_remove_pool(tlsf_t tlsf, pool_t pool)
** TLSF main interface.
*/

#if _DEBUG
int test_ffs_fls()
#if defined(_DEBUG) && _DEBUG
static int test_ffs_fls()
{
/* Verify ffs/fls work properly. */
int rv = 0;
Expand Down Expand Up @@ -1075,7 +1075,7 @@ int test_ffs_fls()

tlsf_t tlsf_create(void* mem)
{
#if _DEBUG
#if defined(_DEBUG) && _DEBUG
if (test_ffs_fls())
{
return 0;
Expand Down

0 comments on commit f94029a

Please sign in to comment.