]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code clean up
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 22 Sep 2008 02:48:13 +0000 (02:48 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 22 Sep 2008 02:48:13 +0000 (02:48 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5941 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c
MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c

index 59c2794b1ff8d6307554d5d74c6ccb298c55ec47..40edda418dda42778f6fd62c99570212d9957dfc 100644 (file)
@@ -45,7 +45,7 @@
   @param  SourceBuffer      Pointer to the source buffer to compare.\r
   @param  Length            Number of bytes to compare.\r
 \r
-  @return 0                 All Length bytes of the two buffers are identical.\r
+  @retval 0                 All Length bytes of the two buffers are identical.\r
   @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first\r
                             mismatched byte in DestinationBuffer.\r
 \r
index e87996a885583f5db0499323f59e2f1a45347ceb..398f9ab44450cfd820e73da58cecfb9942341fdb 100644 (file)
@@ -50,5 +50,9 @@ ZeroMem (
 {\r
   ASSERT (!(Buffer == NULL && Length > 0));\r
   ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
+  if (Length == 0) {\r
+       return Buffer;\r
+  }  \r
+  \r
   return InternalMemZeroMem (Buffer, Length);\r
 }\r