rp: Fixed another clang-tidy warning

This commit is contained in:
dragonmux 2022-07-31 16:44:03 +01:00 committed by Piotr Esden-Tempski
parent 7266e3cf54
commit 6288d5884d
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}