summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c')
-rw-r--r--MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
index 6c539a685e..5b65a1d264 100644
--- a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c
@@ -48,9 +48,10 @@ CompareMem (
IN UINTN Length
)
{
- if (Length == 0 || DestinationBuffer == SourceBuffer) {
+ if ((Length == 0) || (DestinationBuffer == SourceBuffer)) {
return 0;
}
+
ASSERT (DestinationBuffer != NULL);
ASSERT (SourceBuffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));