提交 1ba85140 编写于 作者: C chenwei

fix: codex

1,VFS代码中不修改参数增加const修饰
2,fs_file_mapping.c: 增加安全函数的判空
3,path_cache.c: sizeof改为使用类型
4,fs_syscall.c: 对NULL解引用

close: I3UMWD
Signed-off-by: Yansira's avataryansira <yansira@hotmail.com>
上级 77a33f27
......@@ -2158,7 +2158,7 @@ errout_with_mutex:
return -error;
}
int vfs_nfs_unlink(struct Vnode *parent, struct Vnode *target, char *filename)
int vfs_nfs_unlink(struct Vnode *parent, struct Vnode *target, const char *filename)
{
struct nfsmount *nmp = (struct nfsmount *)(parent->originMount->data);
struct nfsnode *parent_node = NULL;
......@@ -2222,7 +2222,7 @@ errout_with_mutex:
return -error;
}
int vfs_nfs_rmdir(struct Vnode *parent, struct Vnode *target, char *dirname)
int vfs_nfs_rmdir(struct Vnode *parent, struct Vnode *target, const char *dirname)
{
struct nfsmount *nmp = (struct nfsmount *)(parent->originMount->data);
struct nfsnode *parent_node = NULL;
......
......@@ -140,8 +140,8 @@ int tmpfs_readdir(struct Vnode *vp, struct fs_dirent_s *dir);
int tmpfs_rename(struct Vnode *oldVnode, struct Vnode *newParent, const char *oldname, const char *newname);
int tmpfs_mkdir(struct Vnode *parent, const char *relpath, mode_t mode, struct Vnode **vpp);
int tmpfs_create(struct Vnode *dvp, const char *path, int mode, struct Vnode **vpp);
int tmpfs_unlink(struct Vnode *parent, struct Vnode *node, char *relpath);
int tmpfs_rmdir(struct Vnode *parent, struct Vnode *target, char *dirname);
int tmpfs_unlink(struct Vnode *parent, struct Vnode *node, const char *relpath);
int tmpfs_rmdir(struct Vnode *parent, struct Vnode *target, const char *dirname);
int tmpfs_reclaim(struct Vnode *vp);
int tmpfs_statfs(struct Mount *mp, struct statfs *sbp);
......@@ -1854,7 +1854,7 @@ int tmpfs_statfs(struct Mount *mp, struct statfs *sbp)
* Name: tmpfs_unlink
****************************************************************************/
int tmpfs_unlink(struct Vnode *parent, struct Vnode *node, char *relpath)
int tmpfs_unlink(struct Vnode *parent, struct Vnode *node, const char *relpath)
{
FAR struct tmpfs_s *fs;
FAR struct tmpfs_directory_s *parent_dir;
......@@ -2041,7 +2041,7 @@ errout_with_lock:
* Name: tmpfs_rmdir
****************************************************************************/
int tmpfs_rmdir(struct Vnode *parent, struct Vnode *target, char *dirname)
int tmpfs_rmdir(struct Vnode *parent, struct Vnode *target, const char *dirname)
{
FAR struct tmpfs_s *fs;
FAR struct tmpfs_directory_s *parent_dir;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册