]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c
Correct the wrong '?' character to '-', and add check DestinationBuffer == SourceBuff...
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibOptDxe / CompareMemWrapper.c
index 031b7fcec6456ad767d735d05b4ab9f71a632611..61b01096b26bd4dc0869567907fd79693bb55e65 100644 (file)
@@ -58,7 +58,7 @@ CompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (0 == Length) {\r
+  if (Length == 0 || DestinationBuffer == SourceBuffer) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r