Added some descriptive comments for otherwise hard-to-understand bitwise operations

svn path=/trunk/; revision=29530
This commit is contained in:
Mike Nordell 2007-10-12 09:52:23 +00:00
parent 520357b1d4
commit 5005c57755

View file

@ -494,6 +494,9 @@ ObReferenceObjectByHandle(IN HANDLE Handle,
GrantedAccess = CurrentProcess->GrantedAccess;
/* Validate access */
/* ~GrantedAccess = RefusedAccess.*/
/* ~GrantedAccess & DesiredAccess = list of refused bits. */
/* !(~GrantedAccess & DesiredAccess) == TRUE means ALL requested rights are granted */
if ((AccessMode == KernelMode) ||
!(~GrantedAccess & DesiredAccess))
{
@ -539,6 +542,9 @@ ObReferenceObjectByHandle(IN HANDLE Handle,
GrantedAccess = CurrentThread->GrantedAccess;
/* Validate access */
/* ~GrantedAccess = RefusedAccess.*/
/* ~GrantedAccess & DesiredAccess = list of refused bits. */
/* !(~GrantedAccess & DesiredAccess) == TRUE means ALL requested rights are granted */
if ((AccessMode == KernelMode) ||
!(~GrantedAccess & DesiredAccess))
{
@ -608,6 +614,9 @@ ObReferenceObjectByHandle(IN HANDLE Handle,
GrantedAccess = HandleEntry->GrantedAccess;
/* Validate access */
/* ~GrantedAccess = RefusedAccess.*/
/* ~GrantedAccess & DesiredAccess = list of refused bits. */
/* !(~GrantedAccess & DesiredAccess) == TRUE means ALL requested rights are granted */
if ((AccessMode == KernelMode) ||
!(~GrantedAccess & DesiredAccess))
{