From c4995095eec2018618a9f96a09797ce84e470af9 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 15 Jun 2016 19:00:21 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9626 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ex/subsystems/mfs/mfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/os/ex/subsystems/mfs/mfs.c b/os/ex/subsystems/mfs/mfs.c index 58ddcbe81..d232b664d 100644 --- a/os/ex/subsystems/mfs/mfs.c +++ b/os/ex/subsystems/mfs/mfs.c @@ -245,7 +245,9 @@ static mfs_error_t mfs_bank_set_header(MFSDriver *devp, header.magic1 = MFS_BANK_MAGIC_1; header.counter = cnt; header.next = sizeof (mfs_bank_header_t); - header.crc = crc16(0U, (const uint8_t *)&header, sizeof (uint32_t) * 4); + header.crc = crc16(0xFFFFU, + (const uint8_t *)&header, + sizeof (flash_sector_t) - sizeof (uint16_t)); return mfs_flash_write(devp, flashGetSectorOffset(devp->config->flashp, sector), @@ -267,8 +269,8 @@ static mfs_error_t mfs_bank_set_header(MFSDriver *devp, * @notapi */ static mfs_error_t mfs_copy_bank(MFSDriver *devp, - mfs_bank_t sbank, - mfs_bank_t dbank) { + mfs_bank_t sbank, + mfs_bank_t dbank) { (void)devp; (void)sbank; -- cgit v1.2.3