Skip to content

Commit 1a47ab6

Browse files
committed
SecurityPkg/HashLibTpm2: Fix unused variable usage
I am reliably informed in tianocore#11761 that the correct fix here is not to just remove the unused assignment, but rather to fix the line following it, which should have been using the unused value in the way that it now does. Fixes: tianocore@9c651ef Signed-off-by: Mike Beaton <[email protected]>
1 parent aacfbe6 commit 1a47ab6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

SecurityPkg/Library/HashLibTpm2/HashLibTpm2PeilessSecLib.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,7 @@ HasLibTpm2PeilessSecLibConstructor (
586586
}
587587

588588
TcgPcrEvent = (TCG_PCR_EVENT *)EventLog;
589-
TcgEfiSpecIdEventStruct = (TCG_EfiSpecIDEventStruct *)
590-
(EventLog + OFFSET_OF (TCG_PCR_EVENT, Event));
591-
589+
TcgEfiSpecIdEventStruct = (TCG_EfiSpecIDEventStruct *)TcgPcrEvent->Event;
592590
CopyMem (&NumberOfAlgorithms, TcgEfiSpecIdEventStruct + 1, sizeof (NumberOfAlgorithms));
593591
DigestSize = (TCG_EfiSpecIdEventAlgorithmSize *)((UINT8 *)TcgEfiSpecIdEventStruct + sizeof (*TcgEfiSpecIdEventStruct) + sizeof (NumberOfAlgorithms));
594592

0 commit comments

Comments
 (0)