summaryrefslogtreecommitdiff
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
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
-rw-r--r--MdePkg/Library/BaseMemoryLib/MemLibGuid.c2
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMemWrapper.c3
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c3
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c3
-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
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c3
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c3
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLibGuid.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/PeiMemoryLib/SetMemWrapper.c3
-rw-r--r--MdePkg/Library/UefiMemoryLib/MemLibGuid.c2
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c7
-rw-r--r--MdePkg/Library/UefiMemoryLib/SetMemWrapper.c3
48 files changed, 80 insertions, 64 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c b/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLib/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/BaseMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/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/BaseMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/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/BaseMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/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/BaseMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/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/BaseMemoryLib/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLib/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);
}
diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/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/BaseMemoryLibMmx/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/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/BaseMemoryLibMmx/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/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/BaseMemoryLibMmx/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/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/BaseMemoryLibMmx/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/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/BaseMemoryLibMmx/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/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);
}
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/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/BaseMemoryLibOptDxe/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/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/BaseMemoryLibOptDxe/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/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/BaseMemoryLibOptDxe/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/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/BaseMemoryLibOptDxe/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/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/BaseMemoryLibOptDxe/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/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);
}
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);
}
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/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/BaseMemoryLibRepStr/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/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/BaseMemoryLibRepStr/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/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/BaseMemoryLibRepStr/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/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/BaseMemoryLibRepStr/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/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/BaseMemoryLibRepStr/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/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);
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/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);
}
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/PeiMemoryLib/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/PeiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/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/PeiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/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/PeiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/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/PeiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/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/PeiMemoryLib/SetMemWrapper.c b/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/PeiMemoryLib/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);
}
diff --git a/MdePkg/Library/UefiMemoryLib/MemLibGuid.c b/MdePkg/Library/UefiMemoryLib/MemLibGuid.c
index b315ff5322..737341023a 100644
--- a/MdePkg/Library/UefiMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/UefiMemoryLib/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/UefiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c
index f8b3ab9763..1122fb536e 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/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/UefiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c
index d31b13f4d4..60d5eff683 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/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/UefiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c
index 6d7acf3f7b..87d1643642 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/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/UefiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c
index 9efca5e02a..ecf1bdd2a7 100644
--- a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/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/UefiMemoryLib/SetMemWrapper.c b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
index f60691da40..e728175a5c 100644
--- a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/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);
}