https://git.reactos.org/?p=reactos.git;a=commitdiff;h=14077e3f4e3e6048484a2…
commit 14077e3f4e3e6048484a2e32e7625d869b3458cc
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Wed Feb 3 09:41:04 2021 +0100
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Wed Feb 3 09:41:24 2021 +0100
[NTOS:MM] Simplify a check
---
ntoskrnl/cache/section/sptab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ntoskrnl/cache/section/sptab.c b/ntoskrnl/cache/section/sptab.c
index 7d960a1ff08..0877fb085f6 100644
--- a/ntoskrnl/cache/section/sptab.c
+++ b/ntoskrnl/cache/section/sptab.c
@@ -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;
}
}