diff options
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c index 319487dda9..9ded5ca0f1 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( )
{
WriteUnaligned64 (
- (UINT64*)DestinationGuid,
- ReadUnaligned64 ((CONST UINT64*)SourceGuid)
+ (UINT64 *)DestinationGuid,
+ ReadUnaligned64 ((CONST UINT64 *)SourceGuid)
);
WriteUnaligned64 (
- (UINT64*)DestinationGuid + 1,
- ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1)
+ (UINT64 *)DestinationGuid + 1,
+ ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1)
);
return DestinationGuid;
}
@@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1;
UINT64 HighPartOfGuid2;
- LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1);
- LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2);
- HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);
- HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);
+ LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1);
+ LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2);
+ HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1);
+ HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1);
- return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
+ return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
}
/**
@@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid
)
{
- CONST GUID *GuidPtr;
+ CONST GUID *GuidPtr;
ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0);
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0);
- GuidPtr = (GUID*)Buffer;
+ GuidPtr = (GUID *)Buffer;
Buffer = GuidPtr + Length / sizeof (*GuidPtr);
- while (GuidPtr < (CONST GUID*)Buffer) {
+ while (GuidPtr < (CONST GUID *)Buffer) {
if (CompareGuid (GuidPtr, Guid)) {
- return (VOID*)GuidPtr;
+ return (VOID *)GuidPtr;
}
+
GuidPtr++;
}
+
return NULL;
}
@@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid;
UINT64 HighPartOfGuid;
- LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);
- HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid);
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1);
- return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);
+ return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0);
}
|