summaryrefslogtreecommitdiff
path: root/MdePkg/Library/PeiPcdLib
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-14 07:48:36 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-14 07:48:36 +0000
commit3847c8f31510792c260ee7c5c240179fdf1a1458 (patch)
treed306de4ab8ab55745b8b1b7044f852306ee0fbd8 /MdePkg/Library/PeiPcdLib
parentae20899810f22cb159df398533cc17cb7fb93e3b (diff)
downloadedk2-platforms-3847c8f31510792c260ee7c5c240179fdf1a1458.tar.xz
Add missing ASSERT()s in PeiPcdLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1002 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiPcdLib')
-rw-r--r--MdePkg/Library/PeiPcdLib/PeiPcdLib.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
index b8a53185bd..b67d5f4ef2 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
@@ -258,6 +258,8 @@ LibPcdGetEx8 (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->Get8Ex (Guid, TokenNumber);
@@ -285,6 +287,8 @@ LibPcdGetEx16 (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->Get16Ex (Guid, TokenNumber);
@@ -312,6 +316,8 @@ LibPcdGetEx32 (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->Get32Ex (Guid, TokenNumber);
@@ -340,6 +346,8 @@ LibPcdGetEx64 (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->Get64Ex (Guid, TokenNumber);
@@ -367,6 +375,8 @@ LibPcdGetExPtr (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->GetPtrEx (Guid, TokenNumber);
@@ -394,6 +404,8 @@ LibPcdGetExBool (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->GetBoolEx (Guid, TokenNumber);
@@ -421,6 +433,8 @@ LibPcdGetExSize (
{
PCD_PPI * PcdPpi;
+ ASSERT (Guid != NULL);
+
PcdPpi = GetPcdPpiPtr ();
return PcdPpi->GetSizeEx (Guid, TokenNumber);
@@ -450,7 +464,6 @@ LibPcdSet8 (
PcdPpi = GetPcdPpiPtr ();
-
Status = PcdPpi->Set8 (TokenNumber, Value);
ASSERT_EFI_ERROR (Status);
@@ -482,7 +495,6 @@ LibPcdSet16 (
PcdPpi = GetPcdPpiPtr ();
-
Status = PcdPpi->Set16 (TokenNumber, Value);
ASSERT_EFI_ERROR (Status);
@@ -545,7 +557,6 @@ LibPcdSet64 (
PcdPpi = GetPcdPpiPtr ();
-
Status = PcdPpi->Set64 (TokenNumber, Value);
ASSERT_EFI_ERROR (Status);
@@ -628,7 +639,6 @@ LibPcdSetBool (
PcdPpi = GetPcdPpiPtr ();
-
Status = PcdPpi->SetBool (TokenNumber, Value);
ASSERT_EFI_ERROR (Status);
@@ -664,6 +674,7 @@ LibPcdSetEx8 (
PcdPpi = GetPcdPpiPtr ();
+ ASSERT (Guid != NULL);
Status = PcdPpi->Set8Ex (Guid, TokenNumber, Value);
@@ -700,7 +711,7 @@ LibPcdSetEx16 (
PcdPpi = GetPcdPpiPtr ();
-
+ ASSERT (Guid != NULL);
Status = PcdPpi->Set16Ex (Guid, TokenNumber, Value);
ASSERT_EFI_ERROR (Status);
@@ -733,7 +744,7 @@ LibPcdSetEx32 (
{
EFI_STATUS Status;
PCD_PPI * PcdPpi;
-
+ ASSERT (Guid != NULL);
PcdPpi = GetPcdPpiPtr ();
@@ -769,7 +780,7 @@ LibPcdSetEx64 (
{
EFI_STATUS Status;
PCD_PPI * PcdPpi;
-
+ ASSERT (Guid != NULL);
PcdPpi = GetPcdPpiPtr ();
@@ -811,11 +822,11 @@ LibPcdSetExPtr (
{
EFI_STATUS Status;
PCD_PPI *PcdPpi;
-
+ ASSERT (SizeOfBuffer != NULL);
if (*SizeOfBuffer > 0) {
ASSERT (Buffer != NULL);
}
-
+ ASSERT (Guid != NULL);
PcdPpi = GetPcdPpiPtr ();
Status = PcdPpi->SetPtrEx (Guid, TokenNumber, SizeOfBuffer, Buffer);
@@ -855,7 +866,7 @@ LibPcdSetExBool (
PcdPpi = GetPcdPpiPtr ();
-
+ ASSERT (Guid != NULL);
Status = PcdPpi->SetBoolEx (Guid, TokenNumber, Value);
ASSERT_EFI_ERROR (Status);