summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibOptPei
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-07 04:48:53 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-07 04:48:53 +0000
commit56385d49874f4b7cee6c9a0652c6b7c10aff0e2f (patch)
tree8292398b3b2fd47eb414bb8da64dda2ce36a73db /MdePkg/Library/BaseMemoryLibOptPei
parent14e436f9b09c796c4567929984ac7ce5300efb21 (diff)
downloadedk2-platforms-56385d49874f4b7cee6c9a0652c6b7c10aff0e2f.tar.xz
1. fix the wrong description, change "target the buffer" to "the target buffer"
2. fix ICC/GYGGCC build failure on ScanMemN() in X64 arch, it can not reach the last sentence when UINTN is equal to UINT64. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9530 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibOptPei')
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c3
6 files changed, 10 insertions, 8 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c
@@ -98,7 +98,7 @@ CompareGuid (
Scans a target buffer for a GUID, and returns a pointer to the matching GUID
in the target buffer.
- This function searches target the buffer specified by Buffer and Length from
+ This function searches the target buffer specified by Buffer and Length from
the lowest address to the highest address at 128-bit increments for the 128-bit
GUID value that matches Guid. If a match is found, then a pointer to the matching
GUID in the target buffer is returned. If no match is found, then NULL is returned.
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c
@@ -29,7 +29,7 @@
Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value
in the target buffer.
- This function searches target the buffer specified by Buffer and Length from the lowest
+ This function searches the target buffer specified by Buffer and Length from the lowest
address to the highest address for a 16-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c
@@ -28,7 +28,7 @@
Scans a target buffer for a 32-bit value, and returns a pointer to the matching 32-bit value
in the target buffer.
- This function searches target the buffer specified by Buffer and Length from the lowest
+ This function searches the target buffer specified by Buffer and Length from the lowest
address to the highest address for a 32-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c
@@ -29,7 +29,7 @@
Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value
in the target buffer.
- This function searches target the buffer specified by Buffer and Length from the lowest
+ This function searches the target buffer specified by Buffer and Length from the lowest
address to the highest address for a 64-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c
@@ -29,7 +29,7 @@
Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value
in the target buffer.
- This function searches target the buffer specified by Buffer and Length from the lowest
+ This function searches the target buffer specified by Buffer and Length from the lowest
address to the highest address for an 8-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
@@ -65,7 +65,7 @@ ScanMem8 (
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
UINTN sized value in the target buffer.
- This function searches target the buffer specified by Buffer and Length from the lowest
+ This function searches the target buffer specified by Buffer and Length from the lowest
address to the highest address for a UINTN sized value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
@@ -92,7 +92,8 @@ ScanMemN (
{
if (sizeof (UINTN) == sizeof (UINT64)) {
return ScanMem64 (Buffer, Length, (UINT64)Value);
+ } else {
+ return ScanMem32 (Buffer, Length, (UINT32)Value);
}
- return ScanMem32 (Buffer, Length, (UINT32)Value);
}
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c
@@ -85,6 +85,7 @@ SetMemN (
{
if (sizeof (UINTN) == sizeof (UINT64)) {
return SetMem64 (Buffer, Length, (UINT64)Value);
+ } else {
+ return SetMem32 (Buffer, Length, (UINT32)Value);
}
- return SetMem32 (Buffer, Length, (UINT32)Value);
}