[ros-diffs] [sginsberg] 39829: - Fix 37825 -- Yes, we shouldn't check if an unsigned value is larger than or equal to zero, so just fix the check instead of...commenting out the assertion.

sginsberg at svn.reactos.org sginsberg at svn.reactos.org
Sun Mar 1 16:35:32 CET 2009


Author: sginsberg
Date: Sun Mar  1 18:35:31 2009
New Revision: 39829

URL: http://svn.reactos.org/svn/reactos?rev=39829&view=rev
Log:
- Fix 37825 -- Yes, we shouldn't check if an unsigned value is larger than or equal to zero, so just fix the check instead of...commenting out the assertion.

Modified:
    trunk/reactos/ntoskrnl/mm/mdlsup.c

Modified: trunk/reactos/ntoskrnl/mm/mdlsup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mdlsup.c?rev=39829&r1=39828&r2=39829&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mdlsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mdlsup.c [iso-8859-1] Sun Mar  1 18:35:31 2009
@@ -261,7 +261,7 @@
         if (Process)
         {
             /* Handle the accounting of locked pages */
-            /* ASSERT(Process->NumberOfLockedPages >= 0); */ // always true
+            ASSERT(Process->NumberOfLockedPages > 0);
             InterlockedExchangeAddSizeT(&Process->NumberOfLockedPages,
                                         -PageCount);
         }
@@ -276,7 +276,7 @@
     if (Process)
     {
         /* Handle the accounting of locked pages */
-        /* ASSERT(Process->NumberOfLockedPages >= 0); */ // always true
+        ASSERT(Process->NumberOfLockedPages > 0);
         InterlockedExchangeAddSizeT(&Process->NumberOfLockedPages,
                                     -PageCount);
     }



More information about the Ros-diffs mailing list