Fix setting confirm flag

It was impossible to set confirm flag due to incorrect comparison.
In this point of time state->image_ok is already decoded and contains
one of following values:

If BOOT_FLAG_UNSET then we are ok to set a confirm flag.

Signed-off-by: Łukasz Rymanowski <lukasz.rymanowski@codecoup.pl>
This commit is contained in:
Łukasz Rymanowski 2018-09-26 15:31:50 +02:00 committed by Fabio Utzig
parent 1d96f36d01
commit a1927f4d6b
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ boot_set_confirmed(void)
goto done;
}
if (state_slot0.image_ok != erased_val) {
if (state_slot0.image_ok != BOOT_FLAG_UNSET) {
/* Already confirmed. */
goto done;
}