From c034ff7b1516f827ab4538613ec98daa170d9f25 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 5 Sep 2012 15:24:46 +0200 Subject: [PATCH] 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 Autobuild-Date(master): Tue Sep 25 20:05:06 CEST 2012 on sn-devel-104 --- source3/smbd/open.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index eff78d45339..34d552620dd 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)); } /**************************************************************************** -- 2.11.4.GIT