Author: mnordell
Date: Fri Oct 12 13:52:23 2007
New Revision: 29530
URL:
http://svn.reactos.org/svn/reactos?rev=29530&view=rev
Log:
Added some descriptive comments for otherwise hard-to-understand bitwise operations
Modified:
trunk/reactos/ntoskrnl/ob/obref.c
Modified: trunk/reactos/ntoskrnl/ob/obref.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=29…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obref.c (original)
+++ trunk/reactos/ntoskrnl/ob/obref.c Fri Oct 12 13:52:23 2007
@@ -494,6 +494,9 @@
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 @@
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 @@
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))
{