\r
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#include "MemLibInternals.h"\r
\r
+/**\r
+ Internal function to compare two GUIDs.\r
+\r
+ This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.\r
+ If there are any bit differences in the two GUIDs, then FALSE is returned.\r
+\r
+ @param Guid1 A pointer to a 128 bit GUID.\r
+ @param Guid2 A pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid1 and Guid2 are identical.\r
+ @retval FALSE Guid1 and Guid2 are not identical.\r
+\r
+**/\r
BOOLEAN\r
EFIAPI\r
InternalMemCompareGuid (\r
IN CONST GUID *Guid\r
)\r
{\r
- CONST GUID *GuidPtr;\r
+ CONST GUID *GuidPtr;\r
\r
ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0);\r
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0);\r
\r
- GuidPtr = (GUID*)Buffer;\r
+ GuidPtr = (GUID *)Buffer;\r
Buffer = GuidPtr + Length / sizeof (*GuidPtr);\r
- while (GuidPtr < (CONST GUID*)Buffer) {\r
+ while (GuidPtr < (CONST GUID *)Buffer) {\r
if (InternalMemCompareGuid (GuidPtr, Guid)) {\r
- return (VOID*)GuidPtr;\r
+ return (VOID *)GuidPtr;\r
}\r
+\r
GuidPtr++;\r
}\r
+\r
return NULL;\r
}\r
\r