diff options
Diffstat (limited to 'MdePkg/Library/DxePcdLib/DxePcdLib.c')
-rw-r--r-- | MdePkg/Library/DxePcdLib/DxePcdLib.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c index fe7ae4247c..ec5da259a6 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.c +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c @@ -513,8 +513,10 @@ LibPcdSetPtr ( {
EFI_STATUS Status;
UINTN Size;
-
- ASSERT ((*SizeOfBuffer > 0) && Buffer == NULL);
+
+ if (*SizeOfBuffer > 0) {
+ ASSERT (Buffer != NULL);
+ }
Size = LibPcdGetSize (TokenNumber);
@@ -726,8 +728,9 @@ LibPcdSetExPtr ( EFI_STATUS Status;
UINTN Size;
- ASSERT (Guid != NULL);
- ASSERT (Buffer != NULL);
+ if (*SizeOfBuffer > 0) {
+ ASSERT (Buffer != NULL);
+ }
Size = LibPcdGetExSize (Guid, TokenNumber);
if (*SizeOfBuffer > Size) {
|