zephyr: Fix assert booleanness
Fix the __ASSERT() statement so it actually checks for success and not
for failure.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index b8887e0..a1ad861 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -128,7 +128,7 @@
if (detect_value == CONFIG_BOOT_SERIAL_DETECT_PIN_VAL) {
BOOT_LOG_INF("Enter the serial recovery mode");
rc = boot_console_init();
- __ASSERT(rc, "Error initializing boot console.\n");
+ __ASSERT(rc == 0, "Error initializing boot console.\n");
boot_serial_start(&boot_funcs);
__ASSERT(0, "Bootloader serial process was terminated unexpectedly.\n");
}