From 82be94195f7811b6e21bb217075076c544d901ac Mon Sep 17 00:00:00 2001 From: batt Date: Wed, 27 Aug 2008 13:53:50 +0000 Subject: [PATCH] Use correct type. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1720 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/avr/drv/flash_avr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bertos/cpu/avr/drv/flash_avr.c b/bertos/cpu/avr/drv/flash_avr.c index daaf4d9b..03740dd7 100644 --- a/bertos/cpu/avr/drv/flash_avr.c +++ b/bertos/cpu/avr/drv/flash_avr.c @@ -178,7 +178,7 @@ static size_t flash_avr_write(struct KFile *_fd, const void *_buf, size_t size) ASSERT(fd->fd.seek_pos + (kfile_off_t)size <= (kfile_off_t)fd->fd.size); - size = MIN((uint32_t)size, fd->fd.size - fd->fd.seek_pos); + size = MIN((kfile_off_t)size, fd->fd.size - fd->fd.seek_pos); LOG_INFO("Writing at pos[%u]\n", fd->fd.seek_pos); while (size) @@ -249,7 +249,7 @@ static size_t flash_avr_read(struct KFile *_fd, void *buf, size_t size) { FlashAvr *fd = FLASHAVR_CAST(_fd); ASSERT(fd->fd.seek_pos + (kfile_off_t)size <= (kfile_off_t)fd->fd.size); - size = MIN((uint32_t)size, fd->fd.size - fd->fd.seek_pos); + size = MIN((kfile_off_t)size, fd->fd.size - fd->fd.seek_pos); LOG_INFO("Reading at pos[%u]\n", fd->fd.seek_pos); // Flush current buffered page (if modified). -- 2.25.1