diff --git a/tools/unit-tests/unit-mock-flash.c b/tools/unit-tests/unit-mock-flash.c index 549630889..6be1dba0c 100644 --- a/tools/unit-tests/unit-mock-flash.c +++ b/tools/unit-tests/unit-mock-flash.c @@ -33,6 +33,8 @@ static int erased_nvm_bank1 = 0; static int erased_vault = 0; const char *argv0; +#include + /* Mocks */ void hal_init(void) diff --git a/tools/unit-tests/unit-parser.c b/tools/unit-tests/unit-parser.c index 5532f1084..776dc0967 100644 --- a/tools/unit-tests/unit-parser.c +++ b/tools/unit-tests/unit-parser.c @@ -236,8 +236,8 @@ START_TEST (test_parser_borders) ck_assert_msg(wolfBoot_find_header(bad_buff + 8, HDR_TIMESTAMP, &p) == 0, "Parser error: accessing version field out of bounds"); /* High memory access */ - ck_assert(!wolfBoot_find_header(((void *)(0 - 0xF8)), HDR_VERSION, &p) != 0); - ck_assert(!wolfBoot_find_header(((void *)(0 - 0x10)), HDR_VERSION, &p) != 0); + ck_assert(wolfBoot_find_header(((void *)(0 - 0xF8)), HDR_VERSION, &p) == 0); + ck_assert(wolfBoot_find_header(((void *)(0 - 0x10)), HDR_VERSION, &p) == 0); } END_TEST