summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-12-30 19:38:20 -0500
committerBernard Xiong <[email protected]>2022-01-09 00:23:18 +0800
commitf89a162ea3be6536c340c0010aab41cffe9bfac9 (patch)
tree38c0c03a5c5ba348d9b657ad8e7ecb6f938ddf23 /components/utilities
parentbb1084556ff9395e6e5d908edfef9cab6f6fa4dc (diff)
[core] 使用rt_memcpy rt_memset代替memcpy memset
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/utest/utest.c2
-rw-r--r--components/utilities/zmodem/rz.c4
-rw-r--r--components/utilities/zmodem/sz.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c
index 8c8ffd674a..21dc93100b 100644
--- a/components/utilities/utest/utest.c
+++ b/components/utilities/utest/utest.c
@@ -174,7 +174,7 @@ static void utest_run(const char *utest_name)
tc_run_num = 0;
if (tc_fail_list)
{
- memset(tc_fail_list, 0, TC_FAIL_LIST_SIZE);
+ rt_memset(tc_fail_list, 0, TC_FAIL_LIST_SIZE);
}
LOG_I("[==========] [ utest ] loop %d/%d", index + 1, tc_loop);
diff --git a/components/utilities/zmodem/rz.c b/components/utilities/zmodem/rz.c
index 1845fd24c2..224d8f95a8 100644
--- a/components/utilities/zmodem/rz.c
+++ b/components/utilities/zmodem/rz.c
@@ -44,7 +44,7 @@ void zr_start(char *path)
rt_kprintf("zf: out of memory\r\n");
return;
}
- memset(zf, 0, sizeof(struct zfile));
+ rt_memset(zf, 0, sizeof(struct zfile));
zf->fname = path;
zf->fd = -1;
res = zrec_files(zf);
@@ -272,7 +272,7 @@ static rt_err_t zget_file_info(char *name, struct zfile *zf)
rt_free(full_path);
return -RT_ERROR;
}
- memset(full_path,0,len);
+ rt_memset(full_path,0,len);
for (i=0,ptr=zf->fname;i<len-strlen(name)-2;i++)
full_path[i] = *ptr++;
diff --git a/components/utilities/zmodem/sz.c b/components/utilities/zmodem/sz.c
index 0b0b5515f0..e6096756b1 100644
--- a/components/utilities/zmodem/sz.c
+++ b/components/utilities/zmodem/sz.c
@@ -47,7 +47,7 @@ void zs_start(char *path)
return;
}
rt_kprintf("\r\nsz: ready...\r\n"); /* here ready to send things */
- memset(zf, 0, sizeof(struct zfile));
+ rt_memset(zf, 0, sizeof(struct zfile));
zf->fname = path;
zf->fd = -1;
res = zsend_files(zf);