summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-08-01 01:26:07 +0000
committerrwatson <rwatson@FreeBSD.org>2002-08-01 01:26:07 +0000
commit14cc38f1e8b9ecfddcaa4b999ac4fcf315ce8137 (patch)
tree892c6e30437dd4eacfca4a972c504ada6d53a1b7 /sys/kern
parentb5a9c0344c93a4baad65172b9e0509bd7e9f599a (diff)
downloadFreeBSD-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.c9
-rw-r--r--sys/kern/vfs_syscalls.c9
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);
/*
OpenPOWER on IntegriCloud