]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLib/SetMem.c
MdePkg: INF/DEC file updates to EDK II packages
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLib / SetMem.c
index 90780deb51baa2c019aae6b3655329664b630391..5e74085c56f01860ff9b45457355e14a3f52b5cc 100644 (file)
@@ -4,20 +4,18 @@
   build for a particular platform easily if an optimized version\r
   is desired.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
+\r
 \r
 \r
 #include "MemLibInternals.h"\r
@@ -25,9 +23,9 @@
 /**\r
   Set Buffer to Value for Size bytes.\r
 \r
-  @param  Buffer Memory to set.\r
-  @param  Size Number of bytes to set\r
-  @param  Value Value of the set operation.\r
+  @param  Buffer   The memory to set.\r
+  @param  Length   The number of bytes to set.\r
+  @param  Value    The value of the set operation.\r
 \r
   @return Buffer\r
 \r
@@ -35,8 +33,8 @@
 VOID *\r
 EFIAPI\r
 InternalMemSetMem (\r
-  IN      VOID                      *Buffer,\r
-  IN      UINTN                     Size,\r
+  OUT     VOID                      *Buffer,\r
+  IN      UINTN                     Length,\r
   IN      UINT8                     Value\r
   )\r
 {\r
@@ -48,7 +46,7 @@ InternalMemSetMem (
   volatile UINT8                    *Pointer;\r
 \r
   Pointer = (UINT8*)Buffer;\r
-  while (Size-- != 0) {\r
+  while (Length-- > 0) {\r
     *(Pointer++) = Value;\r
   }\r
   return Buffer;\r