File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1277,7 +1277,7 @@ VOID PhFppFreeBlocks(
1277
1277
RtlInitializeBitMap (& bitmap , SegmentHeader -> Bitmap , PH_FP_BLOCK_COUNT );
1278
1278
1279
1279
// Mark the blocks as free.
1280
- startIndex = ( ULONG )(( PCHAR ) BlockHeader - ( PCHAR ) FirstBlock ) >> Pool -> BlockShift ;
1280
+ startIndex = PtrToUlong ( PTR_SUB_OFFSET ( BlockHeader , FirstBlock ) ) >> Pool -> BlockShift ;
1281
1281
blockSpan = BlockHeader -> Span ;
1282
1282
RtlClearBits (& bitmap , startIndex , blockSpan );
1283
1283
SegmentHeader -> FreeBlocks += blockSpan ;
@@ -1480,7 +1480,7 @@ ULONG PhFppEncodeRva(
1480
1480
_In_ PVOID Address
1481
1481
)
1482
1482
{
1483
- return (SegmentIndex << Pool -> SegmentShift ) + ( ULONG )(( PCHAR ) Address - ( PCHAR ) FirstBlock );
1483
+ return (SegmentIndex << Pool -> SegmentShift ) + PtrToUlong ( PTR_SUB_OFFSET ( Address , FirstBlock ) );
1484
1484
}
1485
1485
1486
1486
/**
You can’t perform that action at this time.
0 commit comments