Skip to content

Commit 72737ae

Browse files
committed
samples: nrf_compress: mcuboot_update: Fix wrong hook check
Fixes an issue with combining flags for checking in the slot upload complete hook Signed-off-by: Jamie McCrae <[email protected]>
1 parent 399d9ab commit 72737ae

File tree

1 file changed

+2
-2
lines changed
  • samples/nrf_compress/mcuboot_update/src

1 file changed

+2
-2
lines changed

samples/nrf_compress/mcuboot_update/src/hook.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ static void slot_output_handler(struct k_work *work)
4040
rc = img_mgmt_read_info(SECONDARY_SLOT, NULL, NULL, &slot_flags);
4141

4242
if (!rc) {
43-
slot_flags &= IMAGE_F_COMPRESSED_LZMA2 && IMAGE_F_COMPRESSED_ARM_THUMB_FLT;
43+
slot_flags &= IMAGE_F_COMPRESSED_LZMA2 | IMAGE_F_COMPRESSED_ARM_THUMB_FLT;
4444

45-
if (slot_flags == (IMAGE_F_COMPRESSED_LZMA2 && IMAGE_F_COMPRESSED_ARM_THUMB_FLT)) {
45+
if (slot_flags == (IMAGE_F_COMPRESSED_LZMA2 | IMAGE_F_COMPRESSED_ARM_THUMB_FLT)) {
4646
LOG_INF(
4747
"Secondary slot image is LZMA2 compressed with ARM thumb filter applied");
4848
} else if (slot_flags & IMAGE_F_COMPRESSED_LZMA2) {

0 commit comments

Comments
 (0)