Compares two GUIDs. 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(). @param Guid1 A pointer to a 128 bit GUID. @param Guid2 A pointer to a 128 bit GUID. @retval TRUE Gu
| 69 | |
| 70 | **/ |
| 71 | BOOLEAN |
| 72 | EFIAPI |
| 73 | CompareGuid ( |
| 74 | IN CONST GUID *Guid1, |
| 75 | IN CONST GUID *Guid2 |
| 76 | ) |
| 77 | { |
| 78 | UINT64 LowPartOfGuid1; |
| 79 | UINT64 LowPartOfGuid2; |
| 80 | UINT64 HighPartOfGuid1; |
| 81 | UINT64 HighPartOfGuid2; |
| 82 | |
| 83 | LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); |
| 84 | LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); |
| 85 | HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); |
| 86 | HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); |
| 87 | |
| 88 | return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | Scans a target buffer for a GUID, and returns a pointer to the matching GUID |
no test coverage detected