mirror of https://github.com/acidanthera/audk.git
Add missing ASSERT()s in PeiPcdLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1002 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ae20899810
commit
3847c8f315
|
@ -258,6 +258,8 @@ LibPcdGetEx8 (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->Get8Ex (Guid, TokenNumber);
|
return PcdPpi->Get8Ex (Guid, TokenNumber);
|
||||||
|
@ -285,6 +287,8 @@ LibPcdGetEx16 (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->Get16Ex (Guid, TokenNumber);
|
return PcdPpi->Get16Ex (Guid, TokenNumber);
|
||||||
|
@ -312,6 +316,8 @@ LibPcdGetEx32 (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->Get32Ex (Guid, TokenNumber);
|
return PcdPpi->Get32Ex (Guid, TokenNumber);
|
||||||
|
@ -340,6 +346,8 @@ LibPcdGetEx64 (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->Get64Ex (Guid, TokenNumber);
|
return PcdPpi->Get64Ex (Guid, TokenNumber);
|
||||||
|
@ -367,6 +375,8 @@ LibPcdGetExPtr (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->GetPtrEx (Guid, TokenNumber);
|
return PcdPpi->GetPtrEx (Guid, TokenNumber);
|
||||||
|
@ -394,6 +404,8 @@ LibPcdGetExBool (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->GetBoolEx (Guid, TokenNumber);
|
return PcdPpi->GetBoolEx (Guid, TokenNumber);
|
||||||
|
@ -421,6 +433,8 @@ LibPcdGetExSize (
|
||||||
{
|
{
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
return PcdPpi->GetSizeEx (Guid, TokenNumber);
|
return PcdPpi->GetSizeEx (Guid, TokenNumber);
|
||||||
|
@ -450,7 +464,6 @@ LibPcdSet8 (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
|
||||||
Status = PcdPpi->Set8 (TokenNumber, Value);
|
Status = PcdPpi->Set8 (TokenNumber, Value);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -482,7 +495,6 @@ LibPcdSet16 (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
|
||||||
Status = PcdPpi->Set16 (TokenNumber, Value);
|
Status = PcdPpi->Set16 (TokenNumber, Value);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -545,7 +557,6 @@ LibPcdSet64 (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
|
||||||
Status = PcdPpi->Set64 (TokenNumber, Value);
|
Status = PcdPpi->Set64 (TokenNumber, Value);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -628,7 +639,6 @@ LibPcdSetBool (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
|
||||||
Status = PcdPpi->SetBool (TokenNumber, Value);
|
Status = PcdPpi->SetBool (TokenNumber, Value);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -664,6 +674,7 @@ LibPcdSetEx8 (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
|
|
||||||
Status = PcdPpi->Set8Ex (Guid, TokenNumber, Value);
|
Status = PcdPpi->Set8Ex (Guid, TokenNumber, Value);
|
||||||
|
|
||||||
|
@ -700,7 +711,7 @@ LibPcdSetEx16 (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
Status = PcdPpi->Set16Ex (Guid, TokenNumber, Value);
|
Status = PcdPpi->Set16Ex (Guid, TokenNumber, Value);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -733,7 +744,7 @@ LibPcdSetEx32 (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
|
||||||
|
@ -769,7 +780,7 @@ LibPcdSetEx64 (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
PCD_PPI * PcdPpi;
|
PCD_PPI * PcdPpi;
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
|
||||||
|
@ -811,11 +822,11 @@ LibPcdSetExPtr (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
PCD_PPI *PcdPpi;
|
PCD_PPI *PcdPpi;
|
||||||
|
ASSERT (SizeOfBuffer != NULL);
|
||||||
if (*SizeOfBuffer > 0) {
|
if (*SizeOfBuffer > 0) {
|
||||||
ASSERT (Buffer != NULL);
|
ASSERT (Buffer != NULL);
|
||||||
}
|
}
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
Status = PcdPpi->SetPtrEx (Guid, TokenNumber, SizeOfBuffer, Buffer);
|
Status = PcdPpi->SetPtrEx (Guid, TokenNumber, SizeOfBuffer, Buffer);
|
||||||
|
@ -855,7 +866,7 @@ LibPcdSetExBool (
|
||||||
|
|
||||||
PcdPpi = GetPcdPpiPtr ();
|
PcdPpi = GetPcdPpiPtr ();
|
||||||
|
|
||||||
|
ASSERT (Guid != NULL);
|
||||||
Status = PcdPpi->SetBoolEx (Guid, TokenNumber, Value);
|
Status = PcdPpi->SetBoolEx (Guid, TokenNumber, Value);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
Loading…
Reference in New Issue