summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-07 15:38:52 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-07 15:38:52 +0000
commit533f039eb0bd2a1d5e7f11debb1379b048630021 (patch)
tree6d247323469c5f91d3e7edf21fb2e26c03f5d793 /MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
parent8a43e8dd550a3e92238b3c22bb6ea67d41097e86 (diff)
downloadedk2-533f039eb0bd2a1d5e7f11debb1379b048630021.tar.gz
edk2-533f039eb0bd2a1d5e7f11debb1379b048630021.tar.bz2
edk2-533f039eb0bd2a1d5e7f11debb1379b048630021.zip
BaseMemoryLib:
Correct wrong ASSERT()s on SetMem16(), SetMem32(), SetMem64() HobLib: Add Missing ASSERT()s for BuildGuidHobData() since CopyMem() now allow zero source buffer with length > 0. BasePrintLib Add ASSERT()s to check NULL buffer and NULL format. PostCodeLib Add 3 instances of PostCodeLib and introduce new Pcd for post code property mask. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@438 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c')
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
index 620b69aef4..1ae7acb013 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c
@@ -52,10 +52,10 @@ SetMem32 (
IN UINT32 Value
)
{
- ASSERT (Buffer != NULL);
+ ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
- ASSERT ((Length & (sizeof (Value) - 1)) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) == 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;