diff options
Diffstat (limited to 'sbin/growfs/growfs.c')
-rw-r--r-- | sbin/growfs/growfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 93de327..b3477e6 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1854,10 +1854,10 @@ ginode(ino_t inumber, int fsi, int cg) } DBG_LEAVE; if (sblock.fs_magic == FS_UFS1_MAGIC) - return ((union dinode *) - &((struct ufs1_dinode *)inobuf)[inumber % INOPB(&sblock)]); - return ((union dinode *) - &((struct ufs2_dinode *)inobuf)[inumber % INOPB(&sblock)]); + return (union dinode *)((uintptr_t)inobuf + + (inumber % INOPB(&sblock)) * sizeof(struct ufs1_dinode)); + return (union dinode *)((uintptr_t)inobuf + + (inumber % INOPB(&sblock)) * sizeof(struct ufs2_dinode)); } /* ****************************************************** charsperline ***** */ |