diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-01 10:05:38 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-01 10:05:38 +0000 |
commit | fc153004ffb5d21c53bfd7aa7b91d46f7deb39f6 (patch) | |
tree | 53ed7822c702190e27fb57d7434d60aa62e0b43e /MdePkg/Library/PeiPcdLib | |
parent | e4a3922f03ce0948b7b95d86eea50876a7a239ee (diff) | |
download | edk2-platforms-fc153004ffb5d21c53bfd7aa7b91d46f7deb39f6.tar.xz |
The PCD library function will do ASSERT if CallBackFunction is NULL according to Mde Library Specification.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7386 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiPcdLib')
-rw-r--r-- | MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c index c7aed6dbda..57cf646f6e 100644 --- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c +++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c @@ -869,6 +869,8 @@ LibPcdCallbackOnSet ( {
EFI_STATUS Status;
+ ASSERT (NotificationFunction != NULL);
+
Status = (GetPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, NotificationFunction);
ASSERT_EFI_ERROR (Status);
@@ -902,6 +904,8 @@ LibPcdCancelCallback ( {
EFI_STATUS Status;
+ ASSERT (NotificationFunction != NULL);
+
Status = (GetPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, NotificationFunction);
ASSERT_EFI_ERROR (Status);
|