diff options
Diffstat (limited to 'MdePkg/Library/UefiMemoryLib/SetMemWrapper.c')
-rw-r--r-- | MdePkg/Library/UefiMemoryLib/SetMemWrapper.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c index 0600dc289f..d0e8760ff6 100644 --- a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c +++ b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c @@ -26,30 +26,31 @@ #include "MemLibInternals.h"
/**
- Set Buffer to Value for Size bytes.
+ Fills a target buffer with a byte value, and returns the target buffer.
This function fills Length bytes of Buffer with Value, and returns Buffer.
+ If Length is greater than (MAX_ADDRESS – Buffer + 1), then ASSERT().
- If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set
+ @param Value Value of the set operation.
- @param Buffer Memory to set.
- @param Size Number of bytes to set
- @param Value Value of the set operation.
-
- @return Buffer
+ @return Buffer.
**/
VOID *
EFIAPI
SetMem (
IN VOID *Buffer,
- IN UINTN Size,
+ IN UINTN Length,
IN UINT8 Value
)
{
- if (Size == 0) {
+ if (Length == 0) {
return Buffer;
}
- ASSERT (Size - 1 <= MAX_ADDRESS - (UINTN)Buffer);
- return InternalMemSetMem (Buffer, Size, Value);
+
+ ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
+
+ return InternalMemSetMem (Buffer, Length, Value);
}
|