summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-26 10:18:28 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-26 10:18:28 +0000
commit24e25d11c0460dfb39fade685375c0e58cbcb40e (patch)
treea3e931c8113a9184433b347bacff079df18acac9 /MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
parent23f52b03b4202e4dc5af440a90f0b0864a45dbdd (diff)
downloadedk2-24e25d11c0460dfb39fade685375c0e58cbcb40e.tar.gz
edk2-24e25d11c0460dfb39fade685375c0e58cbcb40e.tar.bz2
edk2-24e25d11c0460dfb39fade685375c0e58cbcb40e.zip
• BaseMemoryLib:
Modify some Aassert()s conditions to sync with MWG 0.56d Modify some defects in function header. • PostCodeLib: Implement PeiDxePostCodeLibReportStatusCode. • Misc Rename BaseDebugLibReportStatusCode to PeiDxeDebugLibReportStatusCode Remove tabs in all .c and .h files in MdePkg. Rename PeiServicesReinstallPpi() to PeiServicesReInstallPpi() Adjust some minor coding style in PeCoffLoaderGetEntryPointerLib() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@626 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c')
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
index d336d59641..9ffc2cf159 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c
@@ -47,12 +47,15 @@
VOID *
EFIAPI
ScanMem16 (
- IN CONST VOID *Buffer,
- IN UINTN Length,
- IN UINT16 Value
+ IN CONST VOID *Buffer,
+ IN UINTN Length,
+ IN UINT16 Value
)
{
- if (Length == 0) {
+ UINTN Stride;
+
+ Stride = Length / sizeof (Value);
+ if (Stride == 0) {
return NULL;
}
@@ -60,5 +63,5 @@ ScanMem16 (
ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
- return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value);
+ return (VOID*)InternalMemScanMem16 (Buffer, Stride, Value);
}