summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c')
-rw-r--r--MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
index 57d82f08ca..0ca0edb69e 100644
--- a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/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));