summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/VarCheckHiiLib
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-08-30 09:57:59 +0800
committerHao Wu <hao.a.wu@intel.com>2016-08-31 11:14:01 +0800
commit39cde03cc5efd67c11dc75cd5ba5e8ccf55c5594 (patch)
treed4d827b1e200cddc07aa3103979ff8df88bbc3a7 /MdeModulePkg/Library/VarCheckHiiLib
parentdc2109946df2522974a058b0bca5530befdea1cd (diff)
downloadedk2-39cde03cc5efd67c11dc75cd5ba5e8ccf55c5594.zip
edk2-39cde03cc5efd67c11dc75cd5ba5e8ccf55c5594.tar.gz
edk2-39cde03cc5efd67c11dc75cd5ba5e8ccf55c5594.tar.bz2
MdeModulePkg: Use IsZeroGuid API for zero GUID checking
Instead of comparing a GUID with gZeroGuid via the CompareGuid API, the commit uses the IsZeroGuid API to check if the given GUID is a zero GUID. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com>
Diffstat (limited to 'MdeModulePkg/Library/VarCheckHiiLib')
-rw-r--r--MdeModulePkg/Library/VarCheckHiiLib/VarCheckHii.h4
-rw-r--r--MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c6
-rw-r--r--MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf3
3 files changed, 4 insertions, 9 deletions
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHii.h b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHii.h
index d770785..a54b867 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHii.h
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHii.h
@@ -1,7 +1,7 @@
/** @file
Include file for Var Check Hii handler and bin.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 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
@@ -22,8 +22,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
-#include <Guid/ZeroGuid.h>
-
#include <Protocol/HiiDatabase.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/FirmwareVolumeBlock.h>
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c
index 21fc80e..71ece27 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c
@@ -1,7 +1,7 @@
/** @file
Var Check Hii generation from FV.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 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
@@ -372,7 +372,7 @@ CreateVfrDriverList (
UINTN Index;
VAR_CHECK_VFR_DRIVER_INFO *VfrDriverInfo;
- for (Index = 0; !CompareGuid (&DriverGuidArray[Index], &gZeroGuid); Index++) {
+ for (Index = 0; !IsZeroGuid (&DriverGuidArray[Index]); Index++) {
DEBUG ((EFI_D_INFO, "CreateVfrDriverList: %g\n", &DriverGuidArray[Index]));
VfrDriverInfo = InternalVarCheckAllocateZeroPool (sizeof (*VfrDriverInfo));
ASSERT (VfrDriverInfo != NULL);
@@ -421,7 +421,7 @@ VarCheckHiiGenFromFv (
//
DriverGuidArray = (EFI_GUID *) PcdGetPtr (PcdVarCheckVfrDriverGuidArray);
- if (CompareGuid (&DriverGuidArray[0], &gZeroGuid)) {
+ if (IsZeroGuid (&DriverGuidArray[0])) {
//
// No VFR driver will be parsed from FVs.
//
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
index 24d24c5..98e6983 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
@@ -46,9 +46,6 @@
PcdLib
VarCheckLib
-[Guids]
- gZeroGuid ## SOMETIMES_CONSUMES ## GUID
-
[Protocols]
gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiFirmwareVolumeBlock2ProtocolGuid ## SOMETIMES_CONSUMES