diff options
Diffstat (limited to 'components/dfs/src/dfs_file.c')
| -rw-r--r-- | components/dfs/src/dfs_file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index 711a461e20..a798bd3c59 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -543,11 +543,11 @@ void ls(const char *pathname) rt_kprintf("Directory %s:\n", path); do { - memset(&dirent, 0, sizeof(struct dirent)); + rt_memset(&dirent, 0, sizeof(struct dirent)); length = dfs_file_getdents(&fd, &dirent, sizeof(struct dirent)); if (length > 0) { - memset(&stat, 0, sizeof(struct stat)); + rt_memset(&stat, 0, sizeof(struct stat)); /* build full path for each file */ fullpath = dfs_normalize_path(path, dirent.d_name); @@ -607,7 +607,7 @@ void cat(const char *filename) do { - memset(buffer, 0, sizeof(buffer)); + rt_memset(buffer, 0, sizeof(buffer)); length = dfs_file_read(&fd, buffer, sizeof(buffer) - 1); if (length > 0) { @@ -692,7 +692,7 @@ static void copydir(const char *src, const char *dst) do { - memset(&dirent, 0, sizeof(struct dirent)); + rt_memset(&dirent, 0, sizeof(struct dirent)); length = dfs_file_getdents(&cpfd, &dirent, sizeof(struct dirent)); if (length > 0) @@ -716,7 +716,7 @@ static void copydir(const char *src, const char *dst) break; } - memset(&stat, 0, sizeof(struct stat)); + rt_memset(&stat, 0, sizeof(struct stat)); if (dfs_file_stat(src_entry_full, &stat) != 0) { rt_kprintf("open file: %s failed\n", dirent.d_name); |
