diff options
| author | tyustli <[email protected]> | 2019-06-18 20:09:19 +0800 |
|---|---|---|
| committer | tyustli <[email protected]> | 2019-06-18 20:09:19 +0800 |
| commit | d8eb0cfc1e119b81290a460883f427a38d572617 (patch) | |
| tree | 9cf38a4283ea507e3349ecb8c449cb1da0fcc789 /components/dfs/src/dfs.c | |
| parent | 34059c40c42c53a541822834d8d9092c640f45b3 (diff) | |
fix kernel and framework no cast type error
Diffstat (limited to 'components/dfs/src/dfs.c')
| -rw-r--r-- | components/dfs/src/dfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 5bddb96930..32cbbf643b 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -141,7 +141,7 @@ static int fd_alloc(struct dfs_fdtable *fdt, int startfd) cnt = fdt->maxfd + 4; cnt = cnt > DFS_FD_MAX ? DFS_FD_MAX : cnt; - fds = rt_realloc(fdt->fds, cnt * sizeof(struct dfs_fd *)); + fds = (struct dfs_fd **)rt_realloc(fdt->fds, cnt * sizeof(struct dfs_fd *)); if (fds == NULL) goto __exit; /* return fdt->maxfd */ /* clean the new allocated fds */ @@ -157,7 +157,7 @@ static int fd_alloc(struct dfs_fdtable *fdt, int startfd) /* allocate 'struct dfs_fd' */ if (idx < (int)fdt->maxfd && fdt->fds[idx] == RT_NULL) { - fdt->fds[idx] = rt_calloc(1, sizeof(struct dfs_fd)); + fdt->fds[idx] = (struct dfs_fd *)rt_calloc(1, sizeof(struct dfs_fd)); if (fdt->fds[idx] == RT_NULL) idx = fdt->maxfd; } @@ -393,7 +393,7 @@ char *dfs_normalize_path(const char *directory, const char *filename) if (filename[0] != '/') /* it's a absolute path, use it directly */ { - fullpath = rt_malloc(strlen(directory) + strlen(filename) + 2); + fullpath = (char *)rt_malloc(strlen(directory) + strlen(filename) + 2); if (fullpath == NULL) return NULL; |
