Skip to content

Commit

Permalink
MdePkg/IntelFrameworkPkg HobLib: Update BuildResourceDescriptorWithOw…
Browse files Browse the repository at this point in the history
…nerHob()

to align the behavior of BuildResourceDescriptorHob().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16279 6f19259b-4bc3-4df7-8a09-765794883524
  • Loading branch information
lzeng14 authored and lzeng14 committed Oct 31, 2014
1 parent 3f103c0 commit a75cf43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions IntelFrameworkPkg/Library/PeiHobLibFramework/HobLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ BuildResourceDescriptorWithOwnerHob (
)
{
EFI_HOB_RESOURCE_DESCRIPTOR *Hob;
EFI_STATUS Status;

Status = PeiServicesCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), (void **)&Hob);
ASSERT_EFI_ERROR (Status);

Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16) sizeof (EFI_HOB_RESOURCE_DESCRIPTOR));
if (Hob == NULL) {
return;
}

Hob->ResourceType = ResourceType;
Hob->ResourceAttribute = ResourceAttribute;
Expand Down
9 changes: 5 additions & 4 deletions MdePkg/Library/PeiHobLib/HobLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,11 @@ BuildResourceDescriptorWithOwnerHob (
)
{
EFI_HOB_RESOURCE_DESCRIPTOR *Hob;
EFI_STATUS Status;

Status = PeiServicesCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), (void **)&Hob);
ASSERT_EFI_ERROR (Status);

Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16) sizeof (EFI_HOB_RESOURCE_DESCRIPTOR));
if (Hob == NULL) {
return;
}

Hob->ResourceType = ResourceType;
Hob->ResourceAttribute = ResourceAttribute;
Expand Down

0 comments on commit a75cf43

Please sign in to comment.