diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-01-15 07:47:06 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-01-15 07:47:06 +0000 |
commit | 315a82270c387767088c4a7fbdbcc722b1ad74b6 (patch) | |
tree | 5ca04e5f4fcd52e53f97f267517418c7ffa01d2d /sys/xfs | |
parent | 7290e5ade3abb02763a90b6ed059391c3a55358a (diff) |
Don't use (type *)var as an lvalue in assigment, it's incorrect.
Provide proper assignment macro instead. No binary change.
ok beck@
Diffstat (limited to 'sys/xfs')
-rw-r--r-- | sys/xfs/xfs_fs.h | 3 | ||||
-rw-r--r-- | sys/xfs/xfs_vfsops-common.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/xfs/xfs_fs.h b/sys/xfs/xfs_fs.h index 525fc077829..99915215907 100644 --- a/sys/xfs/xfs_fs.h +++ b/sys/xfs/xfs_fs.h @@ -61,11 +61,14 @@ struct xfs { #ifdef __osf__ #ifdef HAVE_STRUCT_MOUNT_M_INFO #define VFS_TO_NNPFS(v) ((struct xfs *) ((v)->m_info)) +#define VFS_ASSIGN(v, val) do { (v)->m_info = (void *) (val); } while (0) #else #define VFS_TO_NNPFS(v) ((struct xfs *) ((v)->m_data)) +#define VFS_ASSIGN(v, val) do { (v)->m_data = (void *) (val); } while (0) #endif #else #define VFS_TO_NNPFS(v) ((struct xfs *) ((v)->mnt_data)) +#define VFS_ASSIGN(v, val) do { (v)->mnt_data = (void *) (val); } while (0) #endif #define NNPFS_TO_VFS(x) ((x)->mp) diff --git a/sys/xfs/xfs_vfsops-common.c b/sys/xfs/xfs_vfsops-common.c index 6752f16b039..b808910c4fc 100644 --- a/sys/xfs/xfs_vfsops-common.c +++ b/sys/xfs/xfs_vfsops-common.c @@ -140,7 +140,7 @@ xfs_mount_common_sys(struct mount *mp, nnfs_init_head(&xfs[minor(dev)].nodehead); - VFS_TO_NNPFS(mp) = &xfs[minor(dev)]; + VFS_ASSIGN(mp, &xfs[minor(dev)]); #if defined(HAVE_KERNEL_VFS_GETNEWFSID) #if defined(HAVE_TWO_ARGUMENT_VFS_GETNEWFSID) vfs_getnewfsid(mp, MOUNT_AFS); |