@@ -424,9 +424,9 @@ static void __attribute__((noinline)) wolfBoot_image_clear_signature_ok(
424424 asm volatile ("mov r0, #50" :::"r0" ); \
425425 asm volatile ("mov r0, #50" :::"r0" ); \
426426 asm volatile ("mov r0, #50" :::"r0" ); \
427- compare_res = ! image_CT_compare (digest , img -> sha_hash , \
427+ compare_res = image_CT_compare (digest , img -> sha_hash , \
428428 WOLFBOOT_SHA_DIGEST_SIZE ); \
429- /* Redundant checks that ensure the function actually returned 0 */ \
429+ /* Redundant checks that ensure the function actually returned 1 */ \
430430 asm volatile ("cmp r0, #0" :::"cc" ); \
431431 asm volatile ("cmp r0, #0" :::"cc" ); \
432432 asm volatile ("cmp r0, #0" :::"cc" ); \
@@ -444,10 +444,10 @@ static void __attribute__((noinline)) wolfBoot_image_clear_signature_ok(
444444 asm volatile ("cmp r0, #0" :::"cc" ); \
445445 asm volatile ("bne hnope" ); \
446446 /* Repeat comparison call */ \
447- compare_res = ! image_CT_compare (digest , img -> sha_hash , \
447+ compare_res = image_CT_compare (digest , img -> sha_hash , \
448448 WOLFBOOT_SHA_DIGEST_SIZE ); \
449449 compare_res ; \
450- /* Redundant checks that ensure the function actually returned 0 */ \
450+ /* Redundant checks that ensure the function actually returned 1 */ \
451451 asm volatile ("cmp r0, #0" :::"cc" ); \
452452 asm volatile ("cmp r0, #0" :::"cc" ); \
453453 asm volatile ("cmp r0, #0" :::"cc" ); \
0 commit comments