Skip to content

Commit 19bda0c

Browse files
committed
Remove unused casts
1 parent ef36723 commit 19bda0c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ProcessHacker/syssccpu.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,8 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
861861

862862
for (i = 0; i < NumberOfProcessors; i++)
863863
{
864-
stateDistribution = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(CurrentPerformanceDistribution, CurrentPerformanceDistribution->Offsets[i]);
865-
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(differences, stateSize * i);
864+
stateDistribution = PTR_ADD_OFFSET(CurrentPerformanceDistribution, CurrentPerformanceDistribution->Offsets[i]);
865+
stateDifference = PTR_ADD_OFFSET(differences, stateSize * i);
866866

867867
if (stateDistribution->StateCount != 2)
868868
{
@@ -878,7 +878,7 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
878878
}
879879
else
880880
{
881-
hitcountOld = (PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8)PTR_ADD_OFFSET(stateDistribution->States, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
881+
hitcountOld = PTR_ADD_OFFSET(stateDistribution->States, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
882882
stateDifference->States[j].Hits = hitcountOld->Hits;
883883
stateDifference->States[j].PercentFrequency = hitcountOld->PercentFrequency;
884884
}
@@ -887,8 +887,8 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
887887

888888
for (i = 0; i < NumberOfProcessors; i++)
889889
{
890-
stateDistribution = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(PreviousPerformanceDistribution, PreviousPerformanceDistribution->Offsets[i]);
891-
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(differences, stateSize * i);
890+
stateDistribution = PTR_ADD_OFFSET(PreviousPerformanceDistribution, PreviousPerformanceDistribution->Offsets[i]);
891+
stateDifference = PTR_ADD_OFFSET(differences, stateSize * i);
892892

893893
if (stateDistribution->StateCount != 2)
894894
{
@@ -904,7 +904,7 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
904904
}
905905
else
906906
{
907-
hitcountOld = (PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8)PTR_ADD_OFFSET(stateDistribution->States, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
907+
hitcountOld = PTR_ADD_OFFSET(stateDistribution->States, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
908908
stateDifference->States[j].Hits -= hitcountOld->Hits;
909909
}
910910
}
@@ -917,7 +917,7 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
917917

918918
for (i = 0; i < NumberOfProcessors; i++)
919919
{
920-
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(differences, stateSize * i);
920+
stateDifference = PTR_ADD_OFFSET(differences, stateSize * i);
921921

922922
for (j = 0; j < 2; j++)
923923
{

0 commit comments

Comments
 (0)