diff options
author | Star Zeng <star.zeng@intel.com> | 2013-11-21 09:31:28 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-11-21 09:31:28 +0000 |
commit | f47fc1cb255fe6543fe18648cabd4f1d7245556f (patch) | |
tree | ac32525e317cd079fc566b2ec3cacfb521506015 /MdeModulePkg/Universal | |
parent | b6023fb17dfd0bf90c7e7d2dab483c63bf14925c (diff) | |
download | edk2-platforms-f47fc1cb255fe6543fe18648cabd4f1d7245556f.tar.xz |
MdeModulePkg Pcd: Refine the code to avoid error report.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14879 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Service.c | 1 | ||||
-rw-r--r-- | MdeModulePkg/Universal/PCD/Pei/Service.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index 54c814b562..a9c4c10951 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -169,6 +169,7 @@ GetPcdName ( // Need to get the full PCD name.
//
Name = AllocateZeroPool (AsciiStrSize (TokenSpaceName) + AsciiStrSize (PcdName));
+ ASSERT (Name != NULL);
//
// Catenate TokenSpaceCName and PcdCName with a '.' to form the full PCD name.
//
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index e42d045d27..a4e35c2792 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -138,6 +138,7 @@ GetPcdName ( // Need to get the full PCD name.
//
Name = AllocateZeroPool (AsciiStrSize (TokenSpaceName) + AsciiStrSize (PcdName));
+ ASSERT (Name != NULL);
//
// Catenate TokenSpaceCName and PcdCName with a '.' to form the full PCD name.
//
|