You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/06/02 16:57:23 UTC

[nuttx] branch master updated: mtd: fix a typo

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 01348b70a9 mtd: fix a typo
01348b70a9 is described below

commit 01348b70a94255d320dd309cb5c54c6b1840c7d0
Author: wanggang26 <wa...@xiaomi.com>
AuthorDate: Fri Jun 2 22:43:41 2023 +0800

    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 +