Skip to content

Commit 32b5b9e

Browse files
committed
Replaced uint32_t with uintptr_t
1 parent d8c651c commit 32b5b9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libwolfboot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
240240
#endif
241241

242242
/* check magic in case the sector is corrupt */
243-
word_0 = *((uint32_t*)((uint32_t)base - sizeof(uint32_t)));
244-
word_1 = *((uint32_t*)((uint32_t)base - WOLFBOOT_SECTOR_SIZE - sizeof(uint32_t)));
243+
word_0 = *((uint32_t*)((uintptr_t)base - sizeof(uint32_t)));
244+
word_1 = *((uint32_t*)((uintptr_t)base - WOLFBOOT_SECTOR_SIZE - sizeof(uint32_t)));
245245

246246
if (word_0 == WOLFBOOT_MAGIC_TRAIL && word_1 != WOLFBOOT_MAGIC_TRAIL) {
247247
sel = 0;

0 commit comments

Comments
 (0)