libs: libxx: Fix compile errors with CONFIG_DEBUG_ERROR=y

Summary:
- This commit fixes compile errors in libxx_new.cxx and libxx_newa.cxx

Impact:
- None

Testing:
- Build with spresense:nsh with CONFIG_DEBUG_ERROR=y

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2021-01-15 08:19:20 +09:00 committed by Xiang Xiao
parent caf2d1430e
commit 6626420e46
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ FAR void *operator new(std::size_t nbytes, FAR void *ptr)
{
#ifdef CONFIG_DEBUG_ERROR
if (ptr == nullptr)
if (ptr == 0)
{
_err("ERROR: Failed to placement new\n");
}

View File

@ -101,7 +101,7 @@ FAR void *operator new[](std::size_t nbytes, FAR void *ptr)
{
#ifdef CONFIG_DEBUG_ERROR
if (ptr == nullptr)
if (ptr == 0)
{
_err("ERROR: Failed to placement new[]\n");
}