]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg EsalVariableDxeSal: Use input Global to make code more clear
authorStar Zeng <star.zeng@intel.com>
Thu, 2 Jun 2016 06:38:03 +0000 (14:38 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 3 Jun 2016 07:01:05 +0000 (15:01 +0800)
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 <chao.b.zhang@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c

index 9b167552bbb81632ef40f3dcea576d8d479345f5..dfa85973f4918128e597eb1aa42dd12be18e4e74 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of Extended SAL variable services.\r
 \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials \r
 are licensed and made available under the terms and conditions of the BSD License \r
 which accompanies this distribution.  The full text of the license may be found at \r
@@ -1661,7 +1661,7 @@ AutoUpdateLangVariable(
       FreePool (Global->PlatformLangCodes[VirtualMode]);\r
     }\r
     Global->PlatformLangCodes[VirtualMode] = AllocateRuntimeCopyPool (DataSize, Data);\r
-    ASSERT (mVariableModuleGlobal->PlatformLangCodes[VirtualMode] != NULL);\r
+    ASSERT (Global->PlatformLangCodes[VirtualMode] != NULL);\r
 \r
     //\r
     // PlatformLang holds a single language from PlatformLangCodes, \r