* [PATCH] MdeModulePkg/SmmLockBoxLib: Remove dead code
@ 2023-01-26 18:29 icegambit91
0 siblings, 0 replies; only message in thread
From: icegambit91 @ 2023-01-26 18:29 UTC (permalink / raw)
To: devel; +Cc: Sahil Siddiq
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4317
The "if" condition on line 554 ensures that Guid won't be NULL (or 0) on line 600.
So, there will never be a situation where the "else" block on line 603 is executed.
Signed-off-by: Sahil Siddiq <icegambit91@gmail.com>
---
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c
index 69d4c42ad1..9326158bd4 100644
--- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c
+++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c
@@ -597,11 +597,7 @@ RestoreLockBox (
LockBoxParameterRestore->Header.Command = EFI_SMM_LOCK_BOX_COMMAND_RESTORE;
LockBoxParameterRestore->Header.DataLength = sizeof (*LockBoxParameterRestore);
LockBoxParameterRestore->Header.ReturnStatus = (UINT64)-1;
- if (Guid != 0) {
- CopyMem (&LockBoxParameterRestore->Guid, Guid, sizeof (*Guid));
- } else {
- ZeroMem (&LockBoxParameterRestore->Guid, sizeof (*Guid));
- }
+ CopyMem (&LockBoxParameterRestore->Guid, Guid, sizeof (*Guid));
LockBoxParameterRestore->Buffer = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer;
if (Length != NULL) {
--
2.39.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-26 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 18:29 [PATCH] MdeModulePkg/SmmLockBoxLib: Remove dead code icegambit91
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox