]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLib/CopyMem.c
Synchronize MdePkg h files to Library/Base* c files.
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLib / CopyMem.c
index 079f7cf50686a6904ca7b6a66c7b261571f15e3c..aa2ffea437bee59d1d7cd6a71c24b255e8abd21c 100644 (file)
@@ -22,9 +22,9 @@
 /**\r
   Copy Length bytes from Source to Destination.\r
 \r
-  @param  Destination Target of copy\r
-  @param  Source      Place to copy from\r
-  @param  Length      Number of bytes to copy\r
+  @param  DestinationBuffer Target of copy\r
+  @param  SourceBuffer      Place to copy from\r
+  @param  Length            Number of bytes to copy\r
 \r
   @return Destination\r
 \r
@@ -32,8 +32,8 @@
 VOID *\r
 EFIAPI\r
 InternalMemCopyMem (\r
-  OUT     VOID                      *Destination,\r
-  IN      CONST VOID                *Source,\r
+  OUT     VOID                      *DestinationBuffer,\r
+  IN      CONST VOID                *SourceBuffer,\r
   IN      UINTN                     Length\r
   )\r
 {\r
@@ -45,18 +45,18 @@ InternalMemCopyMem (
   volatile UINT8                    *Destination8;\r
   CONST UINT8                       *Source8;\r
 \r
-  if (Source > Destination) {\r
-    Destination8 = (UINT8*)Destination;\r
-    Source8 = (CONST UINT8*)Source;\r
+  if (SourceBuffer > DestinationBuffer) {\r
+    Destination8 = (UINT8*)DestinationBuffer;\r
+    Source8 = (CONST UINT8*)SourceBuffer;\r
     while (Length-- != 0) {\r
       *(Destination8++) = *(Source8++);\r
     }\r
-  } else if (Source < Destination) {\r
-    Destination8 = (UINT8*)Destination + Length;\r
-    Source8 = (CONST UINT8*)Source + Length;\r
+  } else if (SourceBuffer < DestinationBuffer) {\r
+    Destination8 = (UINT8*)DestinationBuffer + Length;\r
+    Source8 = (CONST UINT8*)SourceBuffer + Length;\r
     while (Length-- != 0) {\r
       *(--Destination8) = *(--Source8);\r
     }\r
   }\r
-  return Destination;\r
+  return DestinationBuffer;\r
 }\r