From: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Date: Thu, 25 May 2017 16:24:06 +0000 (+0300)
Subject: malloc: Turn on DEBUG when enabling unit tests
X-Git-Tag: v2025.01-rc5-pxa1908~6627
X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-logo.png?a=commitdiff_plain;h=4e33316f656bf9a893ad0e828cc9a0acbc0a9d30;p=u-boot.git

malloc: Turn on DEBUG when enabling unit tests

Unit tests require mallinfo which in turn requires DEBUG on
dlmalloc to be enabled.

The dependancy on CONFIG_SANDBOX is wrong.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index adc680e959..fc1e8b391c 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,6 +1,6 @@
 #include <common.h>
 
-#ifdef CONFIG_SANDBOX
+#if defined(CONFIG_UNIT_TEST)
 #define DEBUG
 #endif