[NTOS:MM] Simplify a check

This commit is contained in:
Jérôme Gardou 2021-02-03 09:41:04 +01:00
parent b7eb0fddf3
commit 14077e3f4e

View file

@ -225,7 +225,7 @@ _MmSetPageEntrySectionSegment(PMM_SECTION_SEGMENT Segment,
MmSetSectionAssociation(PFN_FROM_SSE(Entry), Segment, Offset);
InterlockedIncrement64(Segment->ReferenceCount);
if ((Offset->QuadPart > (Segment->LastPage << PAGE_SHIFT)) || !Segment->LastPage)
if (Offset->QuadPart >= (Segment->LastPage << PAGE_SHIFT))
Segment->LastPage = (Offset->QuadPart >> PAGE_SHIFT) + 1;
}
}