diff options
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2')
13 files changed, 22 insertions, 27 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c index ccd38e1aef..031b7fcec6 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c @@ -58,7 +58,7 @@ CompareMem ( IN UINTN Length
)
{
- if (Length == 0) {
+ if (0 == Length) {
return 0;
}
ASSERT (DestinationBuffer != NULL);
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c index f957c8c850..09c18255aa 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c @@ -52,7 +52,7 @@ CopyMem ( IN UINTN Length
)
{
- if (Length == 0) {
+ if (0 == Length) {
return DestinationBuffer;
}
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c index c13cd462e4..cf364c1d1f 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c @@ -80,22 +80,17 @@ CompareGuid ( IN CONST GUID *Guid2
)
{
- UINT64 Guid1ValueLo;
- UINT64 Guid1ValueHi;
- UINT64 Guid2ValueLo;
- UINT64 Guid2ValueHi;
+ UINT64 LowPartOfGuid1;
+ UINT64 LowPartOfGuid2;
+ UINT64 HighPartOfGuid1;
+ UINT64 HighPartOfGuid2;
- Guid1ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid1);
- Guid2ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid2);
+ LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1);
+ LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2);
+ HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);
+ HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);
- Guid1ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid1 + 1);
- Guid2ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid2 + 1);
-
-
- return (BOOLEAN)
- ((Guid1ValueLo == Guid2ValueLo) &&
- (Guid1ValueHi == Guid2ValueHi)
- );
+ return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h index ceddbbe7a0..ce55f447c0 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h @@ -51,7 +51,7 @@ InternalMemCopyMem ( Set Buffer to Value for Size bytes.
@param Buffer Memory to set.
- @param Size Number of bytes to set
+ @param Length Number of bytes to set
@param Value Value of the set operation.
@return Buffer
@@ -123,7 +123,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes.
@param Buffer Memory to set.
- @param Size Number of bytes to set
+ @param Length Number of bytes to set
@return Buffer
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c index 1908788e7e..54abe1c356 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c @@ -56,7 +56,7 @@ ScanMem16 ( IN UINT16 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c index 896d60c208..b91a38b973 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c @@ -56,7 +56,7 @@ ScanMem32 ( IN UINT32 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c index c9cc20316c..f47d700c9b 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c @@ -56,7 +56,7 @@ ScanMem64 ( IN UINT64 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c index 615a0b6171..8164e2a181 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c @@ -54,7 +54,7 @@ ScanMem8 ( IN UINT8 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
ASSERT (Buffer != NULL);
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c index 36ec277ada..0a9936bb9a 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c @@ -55,7 +55,7 @@ SetMem16 ( IN UINT16 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c index e42a3a92a6..d0015a3992 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c @@ -55,7 +55,7 @@ SetMem32 ( IN UINT32 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c index 4ddbc689f1..408c074624 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c @@ -55,7 +55,7 @@ SetMem64 ( IN UINT64 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c index 609eab6db4..0e3428cd7a 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c @@ -49,7 +49,7 @@ SetMem ( IN UINT8 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c index 87565f1c9a..e27851b077 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c @@ -48,7 +48,7 @@ ZeroMem ( IN UINTN Length
)
{
- ASSERT (!(Buffer == NULL && Length > 0));
+ ASSERT (!(NULL == Buffer && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
return InternalMemZeroMem (Buffer, Length);
}
|