diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-22 02:48:13 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-22 02:48:13 +0000 |
commit | e20a8c69b156769de334d091dad88c5c93ef3cf5 (patch) | |
tree | c76afecd6cf22a7459a017be0ff6061d24504845 /MdePkg | |
parent | 36c9465c6dddfd0e6ddf56b138404eb7a11a517b (diff) | |
download | edk2-platforms-e20a8c69b156769de334d091dad88c5c93ef3cf5.tar.xz |
Code clean up
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5941 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c index 59c2794b1f..40edda418d 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c @@ -45,7 +45,7 @@ @param SourceBuffer Pointer to the source buffer to compare.
@param Length Number of bytes to compare.
- @return 0 All Length bytes of the two buffers are identical.
+ @retval 0 All Length bytes of the two buffers are identical.
@retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c index e87996a885..398f9ab444 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c @@ -50,5 +50,9 @@ ZeroMem ( {
ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
+ if (Length == 0) {
+ return Buffer;
+ }
+
return InternalMemZeroMem (Buffer, Length);
}
|