From 6288d5884d4ff53749db583a8673b88a1fca770f Mon Sep 17 00:00:00 2001 From: dragonmux Date: Sun, 31 Jul 2022 16:44:03 +0100 Subject: [PATCH] rp: Fixed another clang-tidy warning --- src/target/rp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/target/rp.c b/src/target/rp.c index 8c57be7..8fe377a 100644 --- a/src/target/rp.c +++ b/src/target/rp.c @@ -467,9 +467,9 @@ static uint32_t rp_get_flash_length(target *t) uint32_t mirrorsec[16]; while (size > FLASHSIZE_4K_SECTOR) { target_mem_read(t, mirrorsec, XIP_FLASH_START + size, sizeof(bootsec)); - if (memcmp(bootsec, mirrorsec, sizeof(bootsec))) - return size << 1; - size >>= 1; + if (memcmp(bootsec, mirrorsec, sizeof(bootsec)) != 0) + return size << 1U; + size >>= 1U; } }