summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePcdLibNull/PcdLib.c
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-26 13:41:23 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-26 13:41:23 +0000
commit3534cbb7a33fd3a65d3f9a442f2d6298cae2ce95 (patch)
tree73c15b1d852d501e67228c40fb5798d160bdba60 /MdePkg/Library/BasePcdLibNull/PcdLib.c
parent923e598702dcc27ddee51038a70103dbb2fd1d4d (diff)
downloadedk2-platforms-3534cbb7a33fd3a65d3f9a442f2d6298cae2ce95.tar.xz
1) correct the assert condition for LibPcdSetPtr and LibPcdSetExPtr
2) make sure VOID* type dynamic PCD entry can handle ASCII string correctly. 3) correct one bug where if StringTable is empty the autogen.c won't compile. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@630 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BasePcdLibNull/PcdLib.c')
-rw-r--r--MdePkg/Library/BasePcdLibNull/PcdLib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/MdePkg/Library/BasePcdLibNull/PcdLib.c b/MdePkg/Library/BasePcdLibNull/PcdLib.c
index 832100758f..de90c2f90e 100644
--- a/MdePkg/Library/BasePcdLibNull/PcdLib.c
+++ b/MdePkg/Library/BasePcdLibNull/PcdLib.c
@@ -461,7 +461,9 @@ LibPcdSetPtr (
IN VOID *Buffer
)
{
- ASSERT (Buffer != NULL);
+ if (*SizeOfBuffer > 0) {
+ ASSERT (Buffer != NULL);
+ }
return Buffer;
}
@@ -630,7 +632,10 @@ LibPcdSetExPtr (
)
{
ASSERT (Guid != NULL);
- ASSERT (Buffer != NULL);
+
+ if (*SizeOfBuffer > 0) {
+ ASSERT (Buffer != NULL);
+ }
return Buffer;
}