From ee60498f3ef94d7ed58dcd38077e27e839e7cafc Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 16 Jul 2011 17:06:30 -0400 Subject: coda_venus_readdir(): use offsetof() Signed-off-by: Al Viro --- fs/coda/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/coda/dir.c') diff --git a/fs/coda/dir.c b/fs/coda/dir.c index cd5532398c1..9d52897c1b6 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c @@ -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; -- cgit v1.2.3