Fixed a bug which was introduced by r16441.
authorHartmut Birr <osexpert@googlemail.com>
Thu, 7 Jul 2005 19:54:25 +0000 (19:54 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Thu, 7 Jul 2005 19:54:25 +0000 (19:54 +0000)
svn path=/trunk/; revision=16497

reactos/ntoskrnl/mm/i386/page.c

index 8a3d263..301b913 100644 (file)
@@ -2102,14 +2102,14 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
       }
       else
       {
-         for (i = Page %1024; i >= 0; i--, Pte--)
+         for (i = Page %1024; (LONG)i >= 0; i--, Pte--)
          {
             if (0LL == ExfInterlockedCompareExchange64UL(Pte, &Entry, &ZeroEntry))
            {
               break;
            }
          }
-         if (i < 0)
+         if ((LONG)i < 0)
          {
             Pte = PAE_ADDR_TO_PTE(HYPERSPACE) + 1023;
            for (i = 1023; i > Page % 1024; i--, Pte--)
@@ -2159,14 +2159,14 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
       }
       else
       {
-         for (i = Page % 1024; i >= 0; i--, Pte--)
+         for (i = Page % 1024; (LONG)i >= 0; i--, Pte--)
          {
             if (0 == InterlockedCompareExchange((PLONG)Pte, (LONG)Entry, 0))
             {
                break;
             }
          }
-         if (i < 0)
+         if ((LONG)i < 0)
          {
             Pte = ADDR_TO_PTE(HYPERSPACE) + 1023;
             for (i = 1023; i > Page % 1024; i--, Pte--)