Skip to content

Commit

Permalink
IntelFrameworkModulePkg: Use IsZeroGuid API for zero GUID checking
Browse files Browse the repository at this point in the history
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: Jeff Fan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
  • Loading branch information
hwu25 committed Aug 31, 2016
1 parent 5f53a7a commit dc21099
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This code produces the Data Hub protocol. It preloads the data hub
with status information copied in from PEI HOBs.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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 @@ -139,7 +139,7 @@ DataHubLogData (
for (Link = GetFirstNode(Head); Link != Head; Link = GetNextNode(Head, Link)) {
FilterEntry = FILTER_ENTRY_FROM_LINK (Link);
if (((FilterEntry->ClassFilter & DataRecordClass) != 0) &&
(CompareGuid (&FilterEntry->FilterDataRecordGuid, &gZeroGuid) ||
(IsZeroGuid (&FilterEntry->FilterDataRecordGuid) ||
CompareGuid (&FilterEntry->FilterDataRecordGuid, DataRecordGuid))) {
gBS->SignalEvent (FilterEntry->Event);
}
Expand Down
4 changes: 1 addition & 3 deletions IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This code supports a the private implementation
of the Data Hub protocol
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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 All @@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

#include <Protocol/DataHub.h>

#include <Guid/ZeroGuid.h>

#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h>
Expand Down
6 changes: 1 addition & 5 deletions IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# drivers to be aware of all reporting formats.
# For more information, please ref http://www.intel.com/technology/framework/
#
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 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
Expand Down Expand Up @@ -70,10 +70,6 @@
DebugLib


[Guids]
gZeroGuid ## SOMETIMES_CONSUMES ## GUID


[Protocols]
gEfiDataHubProtocolGuid ## PRODUCES

Expand Down

0 comments on commit dc21099

Please sign in to comment.