Skip to content

Commit

Permalink
SecurityPkg EsalVariableDxeSal: Use input Global to make code more clear
Browse files Browse the repository at this point in the history
SecurityPkg\VariableAuthenticated\EsalVariableDxeSal\Variable.c
AutoUpdateLangVariable()
Global->PlatformLangCodes[VirtualMode] = AllocateRuntimeCopyPool
  (DataSize, Data);
ASSERT (mVariableModuleGlobal->PlatformLangCodes[VirtualMode] != NULL);

The patch is to use Global instead of mVariableModuleGlobal in the
ASSERT (XXX) to make code more clear although mVariableModuleGlobal is
equal to Global actually.

Cc: Chao Zhang <[email protected]>
Cc: Amy Chan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Chao Zhang <[email protected]>
Reviewed-by: Amy Chan <[email protected]>
Reviewed-by: Giri P Mudusuru <[email protected]>
  • Loading branch information
lzeng14 committed Jun 3, 2016
1 parent da2369d commit 5b03f1b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
The implementation of Extended SAL variable services.
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
Expand Down Expand Up @@ -1661,7 +1661,7 @@ AutoUpdateLangVariable(
FreePool (Global->PlatformLangCodes[VirtualMode]);
}
Global->PlatformLangCodes[VirtualMode] = AllocateRuntimeCopyPool (DataSize, Data);
ASSERT (mVariableModuleGlobal->PlatformLangCodes[VirtualMode] != NULL);
ASSERT (Global->PlatformLangCodes[VirtualMode] != NULL);

//
// PlatformLang holds a single language from PlatformLangCodes,
Expand Down

0 comments on commit 5b03f1b

Please sign in to comment.