Commit ed8461b6 authored by Johann Fischer's avatar Johann Fischer Committed by David Brown
Browse files

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: default avatarJohann Fischer <j.fischer@phytec.de>
parent 84ed794d
Loading
Loading
Loading
Loading
+1 −1
Changes for boot/bootutil/src/loader.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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)