提交 ee60498f 编写于 作者: A Al Viro

coda_venus_readdir(): use offsetof()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 c066b65a
......@@ -449,8 +449,7 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
struct file *host_file;
struct dentry *de;
struct venus_dirent *vdir;
unsigned long vdir_size =
(unsigned long)(&((struct venus_dirent *)0)->d_name);
unsigned long vdir_size = offsetof(struct venus_dirent, d_name);
unsigned int type;
struct qstr name;
ino_t ino;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册