bootutil: loader: fix BOOT_STATUS_ASSERT macro

BOOT_STATUS_ASSERT increments the variable if the macro argument
is evaluated as true, which is incorrect behavior compared to the
ASSERT macro.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
Johann Fischer 2018-02-15 16:50:31 +01:00 committed by David Brown
parent 84ed794d14
commit ed8461b604
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ static struct boot_loader_state boot_data;
static int boot_status_fails = 0;
#define BOOT_STATUS_ASSERT(x) \
do { \
if (x) { \
if (!(x)) { \
boot_status_fails++; \
} \
} while (0)