mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
Added some descriptive comments for otherwise hard-to-understand bitwise operations
svn path=/trunk/; revision=29530
This commit is contained in:
parent
520357b1d4
commit
5005c57755
1 changed files with 9 additions and 0 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue