summaryrefslogtreecommitdiff
path: root/sys/msdosfs
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-03-24 14:03:31 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-03-24 14:03:31 +0000
commit43a817e4850d98c55a26bb9cecbda6756b4c1e74 (patch)
treeff362b4fccc40c99d31760b566d5fe0a977bfc35 /sys/msdosfs
parentc5ee3664a2df00241765bfd8e24b36ca574da481 (diff)
Kill some dead code that tests bits immediately after setting them.
CID 1452873
Diffstat (limited to 'sys/msdosfs')
-rw-r--r--sys/msdosfs/msdosfs_vnops.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 3d0ba67a31e..b0e45969033 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.130 2020/02/27 09:10:31 mpi Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.131 2020/03/24 14:03:30 krw Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -211,14 +211,11 @@ msdosfs_access(void *v)
struct msdosfsmount *pmp = dep->de_pmp;
mode_t dosmode;
- dosmode = (S_IRUSR|S_IRGRP|S_IROTH);
+ dosmode = (S_IRUSR | S_IRGRP | S_IROTH);
if ((dep->de_Attributes & ATTR_READONLY) == 0)
- dosmode |= (S_IWUSR|S_IWGRP|S_IWOTH);
- if (dep->de_Attributes & ATTR_DIRECTORY) {
- dosmode |= (dosmode & S_IRUSR) ? S_IXUSR : 0;
- dosmode |= (dosmode & S_IRGRP) ? S_IXGRP : 0;
- dosmode |= (dosmode & S_IROTH) ? S_IXOTH : 0;
- }
+ dosmode |= (S_IWUSR | S_IWGRP | S_IWOTH);
+ if (dep->de_Attributes & ATTR_DIRECTORY)
+ dosmode |= (S_IXUSR | S_IXGRP | S_IXOTH);
dosmode &= pmp->pm_mask;
return (vaccess(ap->a_vp->v_type, dosmode, pmp->pm_uid, pmp->pm_gid,