summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.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/UefiMemoryLib/SetMem16Wrapper.c
parent8a43e8dd550a3e92238b3c22bb6ea67d41097e86 (diff)
downloadedk2-platforms-533f039eb0bd2a1d5e7f11debb1379b048630021.tar.xz
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/UefiMemoryLib/SetMem16Wrapper.c')
-rw-r--r--MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c b/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c
index 3acbdac436..dea31608fe 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/SetMem16Wrapper.c
@@ -52,10 +52,10 @@ SetMem16 (
IN UINT16 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;