diff options
author | phk <phk@FreeBSD.org> | 2003-05-31 18:46:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-31 18:46:45 +0000 |
commit | 2ebd6ca61ce9d49352ee0135f6ed05a24c08a505 (patch) | |
tree | 8c31e0288e21b4a33932d698c35249a9aea5339b /sys | |
parent | ed8b540a0cf2bb66e86b249e597b2cd08589ea76 (diff) | |
download | FreeBSD-src-2ebd6ca61ce9d49352ee0135f6ed05a24c08a505.zip FreeBSD-src-2ebd6ca61ce9d49352ee0135f6ed05a24c08a505.tar.gz |
Use temporary variable to avoid double expansion of macro with side effects.
Found by: FlexeLint
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/umapfs/umap_vfsops.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index d6ca211..6ace172 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -391,7 +391,10 @@ nullfs_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; { - return VFS_VPTOFH(NULLVPTOLOWERVP(vp), fhp); + struct vnode *lvp; + + lvp = NULLVPTOLOWERVP(vp); + return VFS_VPTOFH(lvp, fhp); } static int diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index 17bee46..5fb2d01 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -418,8 +418,10 @@ umapfs_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; { + struct vnode *lvp; - return (VFS_VPTOFH(UMAPVPTOLOWERVP(vp), fhp)); + lvp = UMAPVPTOLOWERVP(vp); + return (VFS_VPTOFH(lvp, fhp)); } static int |