]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
Remove unused comments in MdePkg.
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibSse2 / MemLibGuid.c
index 351e370c2cc8d63e028ad4a9fcffe7373bff7b76..431ffa393144e3811b9b95199a4fe715fe876d32 100644 (file)
@@ -10,8 +10,6 @@
   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
 \r
-  Module Name:  MemLibGuid.c\r
-\r
   The following BaseMemoryLib instances share the same version of this file:\r
 \r
     BaseMemoryLib\r
     BaseMemoryLibSse2\r
     BaseMemoryLibRepStr\r
     PeiMemoryLib\r
-    UefiMemoryLib\r
+    DxeMemoryLib\r
 \r
 **/\r
 \r
+//\r
+// Include common header file for this module.\r
+//\r
+#include "MemLibInternals.h"\r
+\r
 /**\r
   Copies a source GUID to a destination GUID.\r
 \r
@@ -95,8 +98,9 @@ CompareGuid (
   GUID in the target buffer is returned.  If no match is found, then NULL is returned.\r
   If Length is 0, then NULL is returned.\r
   If Length > 0 and Buffer is NULL, then ASSERT().\r
-  If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
-  If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
+  If Buffer is not aligned on a 32-bit boundary, then ASSERT().\r
+  If Length is not aligned on a 128-bit boundary, then ASSERT().\r
+  If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
 \r
   @param  Buffer  Pointer to the target buffer to scan.\r
   @param  Length  Number of bytes in Buffer to scan.\r
@@ -115,16 +119,12 @@ ScanGuid (
 {\r
   CONST GUID                        *GuidPtr;\r
 \r
-  ASSERT (Buffer != NULL);\r
-  //\r
-  // Make sure Buffer is aligned on a 64-bit boundary.\r
-  //\r
-  ASSERT (((UINTN) Buffer & 7) == 0);\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
-  Buffer = GuidPtr + Length / sizeof (*GuidPtr);\r
+  Buffer  = GuidPtr + Length / sizeof (*GuidPtr);\r
   while (GuidPtr < (CONST GUID*)Buffer) {\r
     if (CompareGuid (GuidPtr, Guid)) {\r
       return (VOID*)GuidPtr;\r