memp: Fix if MEMP_OVERFLOW_CHECK guard in memp_free_pool

Current code already checks memp_overflow_check_all() in memp_free() if
MEMP_OVERFLOW_CHECK >= 2. So in memp_free_pool(), it should use
MEMP_OVERFLOW_CHECK == 1 instead.

Fixes: c838e1ed5b ("Implement possibility to declare private memory pools")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2015-11-19 19:09:04 +08:00 committed by Dirk Ziegelmeier
parent 8010d6706e
commit 5c27429958

View File

@ -363,7 +363,7 @@ memp_free_pool(const struct memp_desc* desc, void *mem)
SYS_ARCH_PROTECT(old_level);
#if MEMP_OVERFLOW_CHECK == 2
#if MEMP_OVERFLOW_CHECK == 1
memp_overflow_check_element_overflow(memp, desc);
memp_overflow_check_element_underflow(memp, desc);
#endif /* MEMP_OVERFLOW_CHECK */