diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-08-01 01:26:07 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-08-01 01:26:07 +0000 |
commit | 14cc38f1e8b9ecfddcaa4b999ac4fcf315ce8137 (patch) | |
tree | 892c6e30437dd4eacfca4a972c504ada6d53a1b7 /sys/kern | |
parent | b5a9c0344c93a4baad65172b9e0509bd7e9f599a (diff) | |
download | FreeBSD-src-14cc38f1e8b9ecfddcaa4b999ac4fcf315ce8137.zip FreeBSD-src-14cc38f1e8b9ecfddcaa4b999ac4fcf315ce8137.tar.gz |
Simplify the logic to enter VFS_EXTATTRCTL().
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_extattr.c | 9 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 9 |
2 files changed, 4 insertions, 14 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 6fb1abf..d14b77e 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3518,13 +3518,8 @@ extattrctl(td, uap) return (error); } - if (uap->attrname != NULL) { - error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, - uap->attrnamespace, attrname, td); - } else { - error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, - uap->attrnamespace, NULL, td); - } + error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, uap->attrnamespace, + uap->attrname != NULL ? attrname : NULL, td); vn_finished_write(mp_writable); /* diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 6fb1abf..d14b77e 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3518,13 +3518,8 @@ extattrctl(td, uap) return (error); } - if (uap->attrname != NULL) { - error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, - uap->attrnamespace, attrname, td); - } else { - error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, - uap->attrnamespace, NULL, td); - } + error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, uap->attrnamespace, + uap->attrname != NULL ? attrname : NULL, td); vn_finished_write(mp_writable); /* |