X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPkg%2FLibrary%2FBaseMemoryLibVstm%2FMemLibGuid.c;h=dc9e2c319ba94933ab47a94ad7f6bbe343a36bd9;hp=d4e504a0137b1537f51cf2d1639b27807644867f;hb=2281eb6f4885c8d78de69645fdee885c4e629b1b;hpb=d6ebcab76903254f4423b7e7d3808fb0abaadb46 diff --git a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c old mode 100755 new mode 100644 index d4e504a013..dc9e2c319b --- a/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c +++ b/ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c @@ -2,7 +2,7 @@ Implementation of GUID functions. The following BaseMemoryLib instances contain the same copy of this file: - + BaseMemoryLib BaseMemoryLibMmx BaseMemoryLibSse2 @@ -30,7 +30,7 @@ This function copies the contents of the 128-bit GUID specified by SourceGuid to DestinationGuid, and returns DestinationGuid. - + If DestinationGuid is NULL, then ASSERT(). If SourceGuid is NULL, then ASSERT(). @@ -63,7 +63,7 @@ CopyGuid ( This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned. If there are any bit differences in the two GUIDs, then FALSE is returned. - + If Guid1 is NULL, then ASSERT(). If Guid2 is NULL, then ASSERT(). @@ -81,17 +81,7 @@ CompareGuid ( IN CONST GUID *Guid2 ) { - UINT64 LowPartOfGuid1; - UINT64 LowPartOfGuid2; - 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); - - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (CompareMem(Guid1, Guid2, sizeof(GUID) == 0)) ? TRUE : FALSE; } /** @@ -103,7 +93,7 @@ CompareGuid ( 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. If Length is 0, then NULL is returned. - + If Length > 0 and Buffer is NULL, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT(). If Length is not aligned on a 128-bit boundary, then ASSERT().