From 01348b70a94255d320dd309cb5c54c6b1840c7d0 Mon Sep 17 00:00:00 2001 From: wanggang26 Date: Fri, 2 Jun 2023 22:43:41 +0800 Subject: [PATCH] mtd: fix a typo --- drivers/mtd/mtd_config_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/mtd_config_fs.c b/drivers/mtd/mtd_config_fs.c index 6c45c5af38..8c425fe89b 100644 --- a/drivers/mtd/mtd_config_fs.c +++ b/drivers/mtd/mtd_config_fs.c @@ -1863,8 +1863,8 @@ static int nvs_next(FAR struct nvs_fs *fs, return rc; } - memcpy(pdata->id, key, sizeof(pdata->id)); - memcpy(pdata->instance, key + sizeof(pdata->id), sizeof(pdata->instance)); + memcpy(&pdata->id, key, sizeof(pdata->id)); + memcpy(&pdata->instance, key + sizeof(pdata->id), sizeof(pdata->instance)); #endif rc = nvs_flash_rd(fs, (rd_addr & ADDR_BLOCK_MASK) + step_ate.offset +