summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-09-05 15:24:46 +0200
committerVolker Lendecke <vl@samba.org>2012-09-25 20:05:06 +0200
commitc034ff7b1516f827ab4538613ec98daa170d9f25 (patch)
treea54c01045ff261450a513b3bfd10d768c05b5547
parent34f2d189846de2cd134756d8f435370b69afb49d (diff)
downloadsamba-c034ff7b1516f827ab4538613ec98daa170d9f25.tar.gz
samba-c034ff7b1516f827ab4538613ec98daa170d9f25.tar.bz2
samba-c034ff7b1516f827ab4538613ec98daa170d9f25.zip
s3: Slightly simplify is_stat_open
The "access_bits" clause is redundant. is_stat_open says that exactly at least one of the stat_open_bits must be set and none else. Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Sep 25 20:05:06 CEST 2012 on sn-devel-104
-rw-r--r--source3/smbd/open.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index eff78d4533..34d552620d 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1071,9 +1071,8 @@ bool is_stat_open(uint32 access_mask)
FILE_READ_ATTRIBUTES|
FILE_WRITE_ATTRIBUTES);
- return (access_mask &&
- ((access_mask & ~stat_open_bits) == 0) &&
- ((access_mask & stat_open_bits) != 0));
+ return (((access_mask & stat_open_bits) != 0) &&
+ ((access_mask & ~stat_open_bits) == 0));
}
/****************************************************************************