This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch pr66 in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6ede4b125209f4fd90be7017012894f53fd505ef Author: Alin Jerpelea <[email protected]> AuthorDate: Thu Jan 11 01:55:49 2018 +0900 drivers: mtd: smart: Fix initialize sector sequence value in smartfs Fix initialization of sequence value into sector header and also avoid unaligned memory access when CONFIG_MTD_SMART_ENABLE_CRC=n. --- drivers/mtd/smart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/smart.c b/drivers/mtd/smart.c index 8f59a53..eb5fa1e 100644 --- a/drivers/mtd/smart.c +++ b/drivers/mtd/smart.c @@ -4213,7 +4213,7 @@ static int smart_write_alloc_sector(FAR struct smart_struct_s *dev, #ifdef CONFIG_MTD_SMART_ENABLE_CRC header->seq = 0; #else - *((FAR uint16_t *) &header->crc8) = 0; + *((FAR uint16_t *) &header->seq) = 0; #endif /* CONFIG_MTD_SMART_ENABLE_CRC */ #else header->seq = 0;
