summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/cbfs.c4
-rw-r--r--src/lib/cbfs_core.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index dc08937932..de25736fc3 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -123,7 +123,7 @@ void * cbfs_load_stage(struct cbfs_media *media, const char *name)
cbfs_get_file_content(media, name, CBFS_TYPE_STAGE, NULL);
/* this is a mess. There is no ntohll. */
/* for now, assume compatible byte order until we solve this. */
- uint32_t entry;
+ uintptr_t entry;
uint32_t final_size;
if (stage == NULL)
@@ -137,7 +137,7 @@ void * cbfs_load_stage(struct cbfs_media *media, const char *name)
final_size = cbfs_decompress(stage->compression,
((unsigned char *) stage) +
sizeof(struct cbfs_stage),
- (void *) (uint32_t) stage->load,
+ (void *) (uintptr_t) stage->load,
stage->len);
if (!final_size)
return (void *) -1;
diff --git a/src/lib/cbfs_core.c b/src/lib/cbfs_core.c
index 19cf83a41d..5e83a4e4ff 100644
--- a/src/lib/cbfs_core.c
+++ b/src/lib/cbfs_core.c
@@ -220,7 +220,7 @@ int cbfs_decompress(int algo, void *src, void *dst, int len)
case CBFS_COMPRESS_NONE:
/* Reads need to be aligned at 4 bytes to avoid
poor flash performance. */
- while (len && ((u32)src & 3)) {
+ while (len && ((uintptr_t)src & 3)) {
*(u8*)dst++ = *(u8*)src++;
len--;
}