提交 55ab7994 编写于 作者: C Caoruihong

fix(assert): enable DEBUGASSERT and fix it

Signed-off-by: NCaoruihong <crh.cao@huawei.com>
Change-Id: I1c84a4c7dffe80ceb3b2d0daa643f2468e071717
上级 b1d19224
......@@ -1414,7 +1414,7 @@ int vfs_nfs_mkdir(struct Vnode *parent, const char *dirname, mode_t mode, struct
/* Sanity checks */
DEBUGASSERT(mountpt && mountpt->i_private);
DEBUGASSERT(parent && parent->data);
/* Check if the mount is still healthy */
......
......@@ -1065,7 +1065,7 @@ ssize_t tmpfs_read(struct file *filep, char *buffer, size_t buflen)
loff_t startpos;
loff_t endpos;
DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
DEBUGASSERT(filep->f_priv != NULL && filep->f_vnode != NULL);
/* Recover our private data from the struct file instance */
......@@ -1209,7 +1209,7 @@ ssize_t tmpfs_write(struct file *filep, const char *buffer, size_t buflen)
int alloc;
char *data;
DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
DEBUGASSERT(filep->f_priv != NULL && filep->f_vnode != NULL);
if (buflen == 0)
{
......@@ -2040,7 +2040,7 @@ int tmpfs_rmdir(struct Vnode *parent, struct Vnode *target, const char *dirname)
struct tmpfs_directory_s *tdo;
int ret = 0;
DEBUGASSERT(parent != NULL && target != NULL && relpath != NULL);
DEBUGASSERT(parent != NULL && target != NULL && dirname != NULL);
/* Get the file system structure from the inode reference. */
fs = parent->originMount->data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册