summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/DxePcdLib
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2013-12-23 06:41:36 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2013-12-23 06:41:36 +0000
commitda660118bd391d1f421f99921f9f15a66a8fc7ea (patch)
tree1a3e4807b0842077bfc482ddce5cc7a57b4569b7 /MdePkg/Library/DxePcdLib
parentadcd7381bb2ab1108b13a838218d8d59e09b54d4 (diff)
downloadedk2-da660118bd391d1f421f99921f9f15a66a8fc7ea.tar.gz
edk2-da660118bd391d1f421f99921f9f15a66a8fc7ea.tar.bz2
edk2-da660118bd391d1f421f99921f9f15a66a8fc7ea.zip
MdePkg PcdLib: Follow the comment of LibPcdGetNextToken to ASSERT when an invalid TokenNumber input.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15016 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/DxePcdLib')
-rw-r--r--MdePkg/Library/DxePcdLib/DxePcdLib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c
index bc87c4e6a1..f14a746529 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.c
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c
@@ -1002,7 +1002,10 @@ LibPcdGetNextToken (
IN UINTN TokenNumber
)
{
- GetPiPcdProtocol()->GetNextToken (Guid, &TokenNumber);
+ EFI_STATUS Status;
+
+ Status = GetPiPcdProtocol()->GetNextToken (Guid, &TokenNumber);
+ ASSERT (!EFI_ERROR (Status) || TokenNumber == 0);
return TokenNumber;
}