From: batt Date: Wed, 27 Aug 2008 13:53:50 +0000 (+0000) Subject: Use correct type. X-Git-Tag: 2.0.0~214 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=82be94195f7811b6e21bb217075076c544d901ac;p=bertos.git Use correct type. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1720 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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).