diff options
Diffstat (limited to 'MdePkg/Library/PeiMemoryLib')
-rw-r--r-- | MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c | 4 | ||||
-rw-r--r-- | MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c | 4 | ||||
-rw-r--r-- | MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c b/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c index 827e6ecf67..3acbdac436 100644 --- a/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/SetMem16Wrapper.c @@ -54,8 +54,8 @@ SetMem16 ( {
ASSERT (Buffer != NULL);
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & 1) != 0);
- ASSERT ((Length & 1) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) != 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;
diff --git a/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c b/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c index 4b9d2413eb..620b69aef4 100644 --- a/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/SetMem32Wrapper.c @@ -54,8 +54,8 @@ SetMem32 ( {
ASSERT (Buffer != NULL);
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & 1) != 0);
- ASSERT ((Length & 1) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) != 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;
diff --git a/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c b/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c index dbf3b62782..73c28af4a1 100644 --- a/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/SetMem64Wrapper.c @@ -54,8 +54,8 @@ SetMem64 ( {
ASSERT (Buffer != NULL);
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & 1) != 0);
- ASSERT ((Length & 1) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) != 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;
|