Skip to content

Commit ee60498

Browse files
author
Al Viro
committed
coda_venus_readdir(): use offsetof()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c066b65 commit ee60498

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/coda/dir.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,7 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
449449
struct file *host_file;
450450
struct dentry *de;
451451
struct venus_dirent *vdir;
452-
unsigned long vdir_size =
453-
(unsigned long)(&((struct venus_dirent *)0)->d_name);
452+
unsigned long vdir_size = offsetof(struct venus_dirent, d_name);
454453
unsigned int type;
455454
struct qstr name;
456455
ino_t ino;

0 commit comments

Comments
 (0)